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