summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-07-20 16:28:39 (GMT)
committerGeorg Brandl <georg@python.org>2006-07-20 16:28:39 (GMT)
commit13cf38c0cf86c2a8e5585d214d0b7fc85119bd7f (patch)
tree0b5c266875fd56b5c534f3a220e6e76a3d8ee96c /Lib
parent1a2959cfa80f43d9a250e6b7ee39cee51b7e8a57 (diff)
downloadcpython-13cf38c0cf86c2a8e5585d214d0b7fc85119bd7f.zip
cpython-13cf38c0cf86c2a8e5585d214d0b7fc85119bd7f.tar.gz
cpython-13cf38c0cf86c2a8e5585d214d0b7fc85119bd7f.tar.bz2
Guard for _active being None in __del__ method.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/subprocess.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index afa92a5..5438f15 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)