cpython: 0f2714e49583 (original) (raw)

Mercurial > cpython

changeset 70554:0f2714e49583 3.2

Close #12085: Fix an attribute error in subprocess.Popen destructor if the constructor has failed, e.g. because of an undeclared keyword argument. Patch written by Oleg Oshmyan. [#12085]

Victor Stinner victor.stinner@haypocalc.com
date Wed, 01 Jun 2011 00:57:47 +0200
parents 2a313ceaf17c
children 71dfd8cf4bf5 f2f74b8d6767
files Lib/subprocess.py Lib/test/test_subprocess.py Misc/ACKS Misc/NEWS
diffstat 4 files changed, 19 insertions(+), 1 deletions(-)[+] [-] Lib/subprocess.py 5 Lib/test/test_subprocess.py 10 Misc/ACKS 1 Misc/NEWS 4

line wrap: on

line diff

--- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -768,7 +768,10 @@ class Popen(object): self.wait() def del(self, _maxsize=sys.maxsize, _active=_active):

--- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -121,6 +121,16 @@ class ProcessTestCase(BaseTestCase): env=newenv) self.assertEqual(rc, 1)

+ def test_stdin_none(self): # .stdin is None when not redirected p = subprocess.Popen([sys.executable, "-c", 'print("banana")'],

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -650,6 +650,7 @@ Piet van Oostrum Jason Orendorff Douglas Orr Michele OrrĂ¹ +Oleg Oshmyan Denis S. Otkidach Michael Otteneder R. M. Oudkerk

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -22,6 +22,10 @@ Core and Builtins Library ------- +- Issue #12085: Fix an attribute error in subprocess.Popen destructor if the