INN commit: branches/2.4/nnrpd (python.c)

INN Commit Russ_Allbery at isc.org
Sun Jun 22 09:52:32 UTC 2008


    Date: Sunday, June 22, 2008 @ 02:52:32
  Author: iulius
Revision: 7890

Fix typos.

Modified:
  branches/2.4/nnrpd/python.c

----------+
 python.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Modified: python.c
===================================================================
--- python.c	2008-06-22 09:50:42 UTC (rev 7889)
+++ python.c	2008-06-22 09:52:32 UTC (rev 7890)
@@ -281,7 +281,7 @@
 
     /* Check the response */
     if (result == NULL || result == Py_None || !PyDict_Check(result)) {
-        syslog(L_ERROR, "python access method returned wrong result - expected a dictionary");
+        syslog(L_ERROR, "python access method returned wrong result -- expected a dictionary");
 	Reply("%d Internal Error (7).  Goodbye\r\n", NNTP_ACCESS_VAL);
 	ExitWithStats(1, true);
      }
@@ -410,7 +410,7 @@
     /* Check the response */
     if (result == NULL || (result != Py_None && !PyString_Check(result)))
     {
-        syslog(L_ERROR, "python dyanmic method (%s access) returned wrong result: %s", PostFlag ? "post" : "read", result);
+        syslog(L_ERROR, "python dynamic method (%s access) returned wrong result: %s", PostFlag ? "post" : "read", result);
 	Reply("%d Internal Error (7).  Goodbye\r\n", NNTP_ACCESS_VAL);
 	ExitWithStats(1, false);
     }
@@ -567,7 +567,7 @@
         Py_Initialize();
     
         /* It makes Python sad when its stdout and stderr are closed. */
-        if (feof(stdout) || feof(stderr))
+        if ((fileno(stdout) == -1) || (fileno(stderr) == -1))
             PyRun_SimpleString("import sys; sys.stdout=sys.stderr=open('/dev/null', 'a')");
    
         /* See if Python initialized OK */



More information about the inn-committers mailing list