aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2017-03-25 21:51:45 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-27 17:22:15 +0100
commit3b797f1a79b051a255295d938e8d525f038bd940 (patch)
tree0b4d58180487d0f1f07ddd3592ebde65437ccb86
parent88c4be92eb5e389f98ee4dc82ab8981e85115af3 (diff)
downloadsos-3b797f1a79b051a255295d938e8d525f038bd940.tar.gz
[dnf] Traceback when dnf history is empty
Set transactions = -1 to skip for loop when dnf history is empty. Resolves: #969 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/dnf.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/dnf.py b/sos/plugins/dnf.py
index c2198ae9..ce963ff2 100644
--- a/sos/plugins/dnf.py
+++ b/sos/plugins/dnf.py
@@ -63,7 +63,7 @@ class DNFPlugin(Plugin, RedHatPlugin):
if self.get_option("history-info"):
history = self.call_ext_prog("dnf history")
- transactions = None
+ transactions = -1
if history['output']:
for line in history['output'].splitlines():
try: