diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-14 12:31:06 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-14 12:31:06 (GMT) |
commit | 3b8bfeffb3bf63ff54a338b60a82c514a00687d3 (patch) | |
tree | 50cef759c2e1889ed5757946f4cf62c15a8e3dc3 | |
parent | da227045837041455eb5672c2084694fe7f3a59a (diff) | |
download | cpython-3b8bfeffb3bf63ff54a338b60a82c514a00687d3.zip cpython-3b8bfeffb3bf63ff54a338b60a82c514a00687d3.tar.gz cpython-3b8bfeffb3bf63ff54a338b60a82c514a00687d3.tar.bz2 |
Fix an oversight in r78946 which causes failure in the subprocess module on Windows.
-rw-r--r-- | Lib/subprocess.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index b6afdec..89cf9bf 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -681,11 +681,11 @@ class Popen(object): restore_signals, start_new_session) if mswindows: - if p2cwrite is not None: + if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) - if c2pread is not None: + if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) - if errread is not None: + if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) if bufsize == 0: @@ -909,11 +909,11 @@ class Popen(object): # output pipe are maintained in this process or else the # pipe will not close when the child process exits and the # ReadFile will hang. - if p2cread is not None: + if p2cread != -1: p2cread.Close() - if c2pwrite is not None: + if c2pwrite != -1: c2pwrite.Close() - if errwrite is not None: + if errwrite != -1: errwrite.Close() |