Procházet zdrojové kódy

Python 2.5 fwd compat.

Chris McDonough před 18 roky
rodič
revize
140c466725
2 změnil soubory, kde provedl 10 přidání a 3 odebrání
  1. 7 0
      CHANGES.txt
  2. 3 3
      src/supervisor/tests.py

+ 7 - 0
CHANGES.txt

@@ -19,6 +19,13 @@
     should never happen), but I cannot identify how.  Maybe the
     assertion will give us more clues if it happens again.
 
+  - Supervisor would crash when run under Python 2.5 because the
+    xmlrpclib.Transport class in Python 2.5 changed in a
+    backward-incompatible way.  Thanks to Eric Westra for the bug
+    report and a fix.
+
+  - Tests now pass under Python 2.5.
+
 2.1b2
 
   - Added new tailProcessLog() command to the XML-RPC API that

+ 3 - 3
src/supervisor/tests.py

@@ -1474,9 +1474,9 @@ class SubprocessTests(unittest.TestCase):
         self.assertEqual(len(options.duped), 3)
         self.assertEqual(len(options.fds_closed), options.minfds - 3)
         self.assertEqual(len(options.written), 1)
-        self.failUnless(options.written[1][0].startswith(
-         "couldn't exec /good/filename: exceptions.RuntimeError, 2: "
-         "file: test.py line:"))
+        msg = options.written[1][0]
+        self.failUnless(msg.startswith("couldn't exec /good/filename:"))
+        self.failUnless("exceptions.RuntimeError" in msg)
         self.assertEqual(options.privsdropped, None)
         self.assertEqual(options._exitcode, 127)