diff -r 540a9c69c2ea Lib/subprocess.py --- a/Lib/subprocess.py Fri Sep 13 19:53:08 2013 +0200 +++ b/Lib/subprocess.py Sun Sep 15 02:44:02 2013 +0300 @@ -883,11 +883,11 @@ # Wait for the process to terminate, to avoid zombies. self.wait() - def __del__(self, _maxsize=sys.maxsize, _active=_active): + def __del__(self, _maxsize=sys.maxsize, _active=_active, _getattr=getattr): # If __init__ hasn't had a chance to execute (e.g. if it # was passed an undeclared keyword argument), we don't # have a _child_created attribute at all. - if not getattr(self, '_child_created', False): + if not _getattr(self, '_child_created', False): # We didn't get to successfully create a child process. return # In case the child hasn't been waited on, check if it's done.