]> 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:38 +0000 (20:35 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 21 Apr 2007 20:35:38 +0000 (20:35 +0000)
not cleared before __del__ is run.

Lib/subprocess.py

index 80a60b974fc703cfd68c623125c5bca28518bf70..11fc4396496dd1e1db0ee25357b7438906a9220d 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