[Python-checkins] r50720 - python/trunk/Lib/subprocess.py

georg.brandl python-checkins at python.org
Thu Jul 20 18:28:40 CEST 2006


Author: georg.brandl
Date: Thu Jul 20 18:28:39 2006
New Revision: 50720

Modified:
   python/trunk/Lib/subprocess.py
Log:
Guard for _active being None in __del__ method.



Modified: python/trunk/Lib/subprocess.py
==============================================================================
--- python/trunk/Lib/subprocess.py	(original)
+++ python/trunk/Lib/subprocess.py	Thu Jul 20 18:28:39 2006
@@ -618,7 +618,7 @@
             return
         # In case the child hasn't been waited on, check if it's done.
         self.poll(_deadstate=sys.maxint)
-        if self.returncode is None:
+        if self.returncode is None and _active is not None:
             # Child is still running, keep us alive until we can wait on it.
             _active.append(self)
 


More information about the Python-checkins mailing list