diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-10-01 17:08:50 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-10-01 17:08:50 +0100 |
commit | b61a193b98b896164a8caefa088bb09297f1e3ca (patch) | |
tree | d0ef72874907fcb00aa174d10e1c37d928ea0fe0 | |
parent | 7c5e32dbab2aef1d1755955d0fa12bb61ffa0d6f (diff) | |
download | sos-b61a193b98b896164a8caefa088bb09297f1e3ca.tar.gz |
[utilities] invert sense of six.PY2 test
Old versions of six do not include a 'PY2' attribute leading to
an exception in sos_get_command_output(). Invert the sense of the
test and check that six.PY3 is false instead as all versions of
the module include this attribute.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/utilities.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/utilities.py b/sos/utilities.py index 7c067811..7e8cd7eb 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -139,7 +139,7 @@ def sos_get_command_output(command, timeout=300, runat=None): command = "timeout %ds %s" % (timeout, command) # shlex.split() reacts badly to unicode on older python runtimes. - if six.PY2: + if not six.PY3: command = command.encode('utf-8') args = shlex.split(command) try: |