]> granicus.if.org Git - python/commitdiff
Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 2 Dec 2001 13:32:15 +0000 (13:32 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 2 Dec 2001 13:32:15 +0000 (13:32 +0000)
Lib/popen2.py

index 8b1af7620ae2064a3ea9cc7d04945518d3b2ee63..14fe12fe3ba2721fadf98f905057ffe0c07132dc 100644 (file)
@@ -8,6 +8,7 @@ and popen3(cmd) which return two or three pipes to the spawned command.
 
 import os
 import sys
+import types
 
 __all__ = ["popen2", "popen3", "popen4"]
 
@@ -56,7 +57,7 @@ class Popen3:
         _active.append(self)
 
     def _run_child(self, cmd):
-        if type(cmd) == type(''):
+        if isinstance(cmd, types.StringTypes):
             cmd = ['/bin/sh', '-c', cmd]
         for i in range(3, MAXFD):
             try: