diff options
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index e4ca5f5..d375514 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1535,10 +1535,8 @@ class Popen(object): self.stderr.close() # All data exchanged. Translate lists into strings. - if stdout is not None: - stdout = stdout[0] - if stderr is not None: - stderr = stderr[0] + stdout = stdout[0] if stdout else None + stderr = stderr[0] if stderr else None return (stdout, stderr) |