diff options
author | Pierre Equoy <pierre.equoy@canonical.com> | 2018-11-27 14:22:33 +0800 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-19 12:06:25 +0000 |
commit | 3bc04b0e6e00bdabc786fc9f00739465f3636865 (patch) | |
tree | 8dc31347dea796d47705b088b8b7e258206cd695 | |
parent | 51c8f3c923ed448fa0400c4b7f82b8a608b3d614 (diff) | |
download | sos-3bc04b0e6e00bdabc786fc9f00739465f3636865.tar.gz |
[policies] Fix default xz version
While running some tests using sosreport in a snap, I ran into the
following issue:
Creating compressed archive...
[archive:TarFileArchive] An error occurred compressing the archive:
unorderable types: int() >= str()
This is because the `xz_version` variable might be set to a list
containing one integer, but it was later compared to a list of strings,
raising an exception.
Resolves: #1485
Signed-off-by: Pierre Equoy <pierre.equoy@canonical.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/policies/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py index ae85991c..e3c1b60d 100644 --- a/sos/policies/__init__.py +++ b/sos/policies/__init__.py @@ -555,7 +555,7 @@ No changes will be made to system configuration. xz_version = self.package_manager\ .all_pkgs()[xz_package]["version"] except Exception as e: - xz_version = [0] # deal like xz version is really old + xz_version = [u'0'] # deal like xz version is really old if xz_version >= [u'5', u'2']: cmd = "%s -T%d" % (cmd, threads) return cmd |