diff Lib/subprocess.py @ 43684:4bb6a0c353ab

Patch # 1331 by Christian Heimes. The patch fixes some of the problems on Windows. It doesn't introduce addition problems on Linux.
author Guido van Rossum <guido@python.org>
date Fri, 26 Oct 2007 04:29:23 +0000
parents ace45b361e87
children 0d462d789b18
line wrap: on
line diff
--- a/Lib/subprocess.py	Thu Oct 25 23:47:33 2007 +0000
+++ b/Lib/subprocess.py	Fri Oct 26 04:29:23 2007 +0000
@@ -809,6 +809,8 @@
 
             if self.stdin:
                 if input is not None:
+                    if isinstance(input, str):
+                        input = input.encode()
                     self.stdin.write(input)
                 self.stdin.close()