]> granicus.if.org Git - python/commitdiff
Bug #1704790: bind name "sys" locally in __del__ method so that it is
authorGeorg Brandl <georg@python.org>
Sat, 21 Apr 2007 20:35:49 +0000 (20:35 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 21 Apr 2007 20:35:49 +0000 (20:35 +0000)
not cleared before __del__ is run.
 (backport from rev. 54918)

Lib/subprocess.py

index aeca23d1a5db08ccfce4fad4d070f1f54c692b2b..ee9b4a2082fac525ff325724e22b439037f7a5a5 100644 (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