summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 6b9bb6b..6eb9385 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -809,6 +809,8 @@ class Popen(object):
if self.stdin:
if input is not None:
+ if isinstance(input, str):
+ input = input.encode()
self.stdin.write(input)
self.stdin.close()