Blame SOURCES/0001-utilities-invert-sense-of-six.PY2-test.patch

0cd6dc
From b61a193b98b896164a8caefa088bb09297f1e3ca Mon Sep 17 00:00:00 2001
0cd6dc
From: "Bryn M. Reeves" <bmr@redhat.com>
0cd6dc
Date: Wed, 1 Oct 2014 17:08:50 +0100
0cd6dc
Subject: [PATCH 01/93] [utilities] invert sense of six.PY2 test
0cd6dc
0cd6dc
Old versions of six do not include a 'PY2' attribute leading to
0cd6dc
an exception in sos_get_command_output(). Invert the sense of the
0cd6dc
test and check that six.PY3 is false instead as all versions of
0cd6dc
the module include this attribute.
0cd6dc
0cd6dc
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
0cd6dc
---
0cd6dc
 sos/utilities.py | 2 +-
0cd6dc
 1 file changed, 1 insertion(+), 1 deletion(-)
0cd6dc
0cd6dc
diff --git a/sos/utilities.py b/sos/utilities.py
0cd6dc
index 7c06781..7e8cd7e 100644
0cd6dc
--- a/sos/utilities.py
0cd6dc
+++ b/sos/utilities.py
0cd6dc
@@ -139,7 +139,7 @@ def sos_get_command_output(command, timeout=300, runat=None):
0cd6dc
         command = "timeout %ds %s" % (timeout, command)
0cd6dc
 
0cd6dc
     # shlex.split() reacts badly to unicode on older python runtimes.
0cd6dc
-    if six.PY2:
0cd6dc
+    if not six.PY3:
0cd6dc
         command = command.encode('utf-8')
0cd6dc
     args = shlex.split(command)
0cd6dc
     try:
0cd6dc
-- 
0cd6dc
1.9.3
0cd6dc