From: Georg Brandl Date: Thu, 20 Jul 2006 16:28:39 +0000 (+0000) Subject: Guard for _active being None in __del__ method. X-Git-Tag: v2.5b3~215 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13cf38c0cf86c2a8e5585d214d0b7fc85119bd7f;p=python Guard for _active being None in __del__ method. --- diff --git a/Lib/subprocess.py b/Lib/subprocess.py index afa92a504c..5438f158cb 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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)