diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-10-01 17:34:56 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-10-01 17:34:56 +0100 |
commit | f9c811abc07f1e3044b1dbf29fdd5cd1f68812bc (patch) | |
tree | cc664e0175bccbb59670d32f2f736b170067b3b3 | |
parent | b61a193b98b896164a8caefa088bb09297f1e3ca (diff) | |
download | sos-f9c811abc07f1e3044b1dbf29fdd5cd1f68812bc.tar.gz |
[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 <bmr@redhat.com>
-rw-r--r-- | sos/archive.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/archive.py b/sos/archive.py index 245f904f..2e42bbd0 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") |