diff --git a/Lib/subprocess.py b/Lib/subprocess.py --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -800,7 +800,7 @@ self.wait() def __del__(self, _maxsize=sys.maxsize, _active=_active): - if not self._child_created: + 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.