diff options
-rw-r--r-- | sos/utilities.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sos/utilities.py b/sos/utilities.py index 4dffe695..7c067811 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -138,6 +138,9 @@ def sos_get_command_output(command, timeout=300, runat=None): if timeout and is_executable("timeout"): command = "timeout %ds %s" % (timeout, command) + # shlex.split() reacts badly to unicode on older python runtimes. + if six.PY2: + command = command.encode('utf-8') args = shlex.split(command) try: p = Popen(args, shell=False, stdout=PIPE, stderr=STDOUT, |