commit | 15136b3669e3ac59445fa7543be78a99997f9bdb | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sat Apr 21 20:35:49 2007 +0000 |
committer | Georg Brandl <georg@python.org> | Sat Apr 21 20:35:49 2007 +0000 |
tree | 6abe85998809c7092ad909646d2aaba2623264f9 | |
parent | 5e4e31f76a18e45d88a24ce7b6efc07e420d805b [diff] [blame] |
Bug #1704790: bind name "sys" locally in __del__ method so that it is not cleared before __del__ is run. (backport from rev. 54918)
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index aeca23d..ee9b4a2 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py
@@ -628,7 +628,7 @@ 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