aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 7ae8df154b4..760b93b47eb 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -456,7 +456,8 @@ def check_output(*popenargs, timeout=None, **kwargs):
if 'input' in kwargs and kwargs['input'] is None:
# Explicitly passing input=None was previously equivalent to passing an
# empty string. That is maintained here for backwards compatibility.
- if kwargs.get('universal_newlines') or kwargs.get('text'):
+ if kwargs.get('universal_newlines') or kwargs.get('text') or kwargs.get('encoding') \
+ or kwargs.get('errors'):
empty = ''
else:
empty = b''