]> granicus.if.org Git - python/commitdiff
Guard for _active being None in __del__ method.
authorGeorg Brandl <georg@python.org>
Thu, 20 Jul 2006 16:28:39 +0000 (16:28 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 20 Jul 2006 16:28:39 +0000 (16:28 +0000)
Lib/subprocess.py

index afa92a504c672b9d3ca4eccf60ab85f1d901498a..5438f158cb84c97d6337116dc947c03021b18c48 100644 (file)
@@ -618,7 +618,7 @@ class Popen(object):
             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)