summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-26 04:29:23 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-26 04:29:23 (GMT)
commitc12a813aa7671ee12ccb79a70177a62bcefa2561 (patch)
treef6512593e7c4ed8211f2dd2c34c8676b5ed6301e /Lib/subprocess.py
parentdaa251ca097e7f7382ed57c10efbbaddad103afb (diff)
downloadcpython-c12a813aa7671ee12ccb79a70177a62bcefa2561.zip
cpython-c12a813aa7671ee12ccb79a70177a62bcefa2561.tar.gz
cpython-c12a813aa7671ee12ccb79a70177a62bcefa2561.tar.bz2
Patch # 1331 by Christian Heimes.
The patch fixes some of the problems on Windows. It doesn't introduce addition problems on Linux.
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()