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:
James E. Blair
2011-12-26 09:05:41 -08:00
parent b26118cabb
commit d97ffdd964

View File

@@ -46,7 +46,7 @@ _has_color = None
def run_command(cmd, status=False, env={}):
if VERBOSE:
print "Running:", cmd
cmd_list = shlex.split(cmd)
cmd_list = shlex.split(str(cmd))
newenv = os.environ
newenv.update(env)
p = subprocess.Popen(cmd_list, stdout=subprocess.PIPE,