[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
Terry J. Reedy
report at bugs.python.org
Sun Sep 22 02:05:16 CEST 2013
Terry J. Reedy added the comment:
Right. If _internal_poll raises, it should not be masked as that would be a true bug.
More research. 'self.returncode = None' comes before the only call to the appropriate posix/windows version of ._execute_child(), which is the only place where '_child_created = True'. So class level
_child_created = False # needed for __del__ if __init__ call fails
should be sufficient. With that added,
self._child_created = False
in __init__ would not be really needed.
As I said on pydev, making the warning a Warning would be a different issue.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12085>
_______________________________________
More information about the Python-bugs-list
mailing list