mirror of
https://github.com/python/cpython.git
synced 2026-03-02 02:51:10 +00:00
Bug #1704790: bind name "sys" locally in __del__ method so that it is
not cleared before __del__ is run.
This commit is contained in:
parent
5d08bd7fb2
commit
24522982d0
1 changed files with 1 additions and 1 deletions
|
|
@ -628,7 +628,7 @@ def _translate_newlines(self, data):
|
|||
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…
Add table
Add a link
Reference in a new issue