Only pass plain strings to shlex.split.
According to http://bugs.python.org/issue6988 some versions of shlex.split can't handle unicode input, always producing ucs-4 output. This addresses that problem, which is present for me in oneiric. Change-Id: I6d22825e2accfb4ff395d2a2f9efdb20fc413073
This commit is contained in:
@@ -46,7 +46,7 @@ _has_color = None
|
|||||||
def run_command(cmd, status=False, env={}):
|
def run_command(cmd, status=False, env={}):
|
||||||
if VERBOSE:
|
if VERBOSE:
|
||||||
print "Running:", cmd
|
print "Running:", cmd
|
||||||
cmd_list = shlex.split(cmd)
|
cmd_list = shlex.split(str(cmd))
|
||||||
newenv = os.environ
|
newenv = os.environ
|
||||||
newenv.update(env)
|
newenv.update(env)
|
||||||
p = subprocess.Popen(cmd_list, stdout=subprocess.PIPE,
|
p = subprocess.Popen(cmd_list, stdout=subprocess.PIPE,
|
||||||
|
Reference in New Issue
Block a user