Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.

This commit is contained in:
Martin v. Löwis 2001-12-02 13:32:15 +00:00
parent 06f15bbcc4
commit 95b057e3ea
1 changed files with 2 additions and 1 deletions

View 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: