From: Georg Brandl Date: Sat, 21 Apr 2007 20:35:49 +0000 (+0000) Subject: Bug #1704790: bind name "sys" locally in __del__ method so that it is X-Git-Tag: v2.5.2c1~342 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=15136b3669e3ac59445fa7543be78a99997f9bdb;p=python 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 aeca23d1a5..ee9b4a2082 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -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