[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list
STINNER Victor
report at bugs.python.org
Thu May 26 13:07:49 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
We can use a class attribute to set the attribute before calling __init__:
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -664,6 +664,8 @@ _PLATFORM_DEFAULT_CLOSE_FDS = object()
class Popen(object):
+ _child_created = False
+
def __init__(self, args, bufsize=0, executable=None,
stdin=None, stdout=None, stderr=None,
preexec_fn=None, close_fds=_PLATFORM_DEFAULT_CLOSE_FDS,
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12085>
_______________________________________
More information about the Python-bugs-list
mailing list