mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Guard for _active being None in __del__ method.
This commit is contained in:
parent
1a2959cfa8
commit
13cf38c0cf
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue