[Python-checkins] r60790 - python/trunk/Lib/SocketServer.py

raymond.hettinger python-checkins at python.org
Thu Feb 14 10:32:45 CET 2008


Author: raymond.hettinger
Date: Thu Feb 14 10:32:45 2008
New Revision: 60790

Modified:
   python/trunk/Lib/SocketServer.py
Log:
Add diagnostic message to help figure-out why SocketServer tests occasionally crash
when trying to remove a pid that in not in the activechildren list.



Modified: python/trunk/Lib/SocketServer.py
==============================================================================
--- python/trunk/Lib/SocketServer.py	(original)
+++ python/trunk/Lib/SocketServer.py	Thu Feb 14 10:32:45 2008
@@ -452,7 +452,11 @@
             except os.error:
                 pid = None
             if not pid: break
-            self.active_children.remove(pid)
+            try:
+                self.active_children.remove(pid)
+            except ValueError, e:
+                raise ValueError('%s. x=%d and list=%r' % (e.message, pid,
+                                                           self.active_children))
 
     def handle_timeout(self):
         """Wait for zombies after self.timeout seconds of inactivity.


More information about the Python-checkins mailing list