Blame SOURCES/0002-archive-invert-sense-of-six.PY2-test.patch

0cd6dc
From f9c811abc07f1e3044b1dbf29fdd5cd1f68812bc Mon Sep 17 00:00:00 2001
0cd6dc
From: "Bryn M. Reeves" <bmr@redhat.com>
0cd6dc
Date: Wed, 1 Oct 2014 17:34:56 +0100
0cd6dc
Subject: [PATCH 02/93] [archive] 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/archive.py | 2 +-
0cd6dc
 1 file changed, 1 insertion(+), 1 deletion(-)
0cd6dc
0cd6dc
diff --git a/sos/archive.py b/sos/archive.py
0cd6dc
index 245f904..2e42bbd 100644
0cd6dc
--- a/sos/archive.py
0cd6dc
+++ b/sos/archive.py
0cd6dc
@@ -357,7 +357,7 @@ class TarFileArchive(FileCacheArchive):
0cd6dc
 
0cd6dc
     def _build_archive(self):
0cd6dc
         # python2.6 TarFile lacks the filter parameter
0cd6dc
-        if six.PY2 and sys.version_info[1] < 7:
0cd6dc
+        if not six.PY3 and sys.version_info[1] < 7:
0cd6dc
             tar = _TarFile.open(self._archive_name, mode="w")
0cd6dc
         else:
0cd6dc
             tar = tarfile.open(self._archive_name, mode="w")
0cd6dc
-- 
0cd6dc
1.9.3
0cd6dc