aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-06-29 15:49:00 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-06-30 08:41:18 -0400
commit6d5cbe90e17534d53d7fe42dff4d8ca734acf594 (patch)
tree413bc4139682300cbbb0befaf3c7473244b86af9
parent465217cfa0c3e7e9ce38b637d388c07005e930b4 (diff)
downloadsos-6d5cbe90e17534d53d7fe42dff4d8ca734acf594.tar.gz
[yum] Fix potential traceback when yum history is empty
Like we did in #969 for `dnf`, fix a potential issue where we would generate a traceback in the plugin when `yum history` is empty. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/yum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/report/plugins/yum.py b/sos/report/plugins/yum.py
index 54e222df..aec805e6 100644
--- a/sos/report/plugins/yum.py
+++ b/sos/report/plugins/yum.py
@@ -91,7 +91,7 @@ class Yum(Plugin, RedHatPlugin):
# packages installed/erased/updated per transaction
if self.get_option("yum-history-info"):
history = self.exec_cmd("yum history")
- transactions = None
+ transactions = -1
if history['status'] == 0:
for line in history['output'].splitlines():
try: