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:
Georg Brandl 2007-04-21 20:35:49 +00:00
parent 5e4e31f76a
commit 15136b3669
1 changed files with 1 additions and 1 deletions

View File

@ -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