mirror of https://github.com/python/cpython
Bug #1704790: bind name "sys" locally in __del__ method so that it is
not cleared before __del__ is run. (backport from rev. 54918)
This commit is contained in:
parent
5e4e31f76a
commit
15136b3669
|
@ -628,7 +628,7 @@ class Popen(object):
|
|||
return data
|
||||
|
||||
|
||||
def __del__(self):
|
||||
def __del__(self, sys=sys):
|
||||
if not self._child_created:
|
||||
# We didn't get to successfully create a child process.
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue