From 749a9761b21c0528afc2fe78463a0f97569e4e48 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sat, 5 Nov 2016 20:04:04 +0100 Subject: [PATCH] [modules/dnf] Fix for python2 This usage of split actually broke python2.... Wonder why I never noticed that before. --- bumblebee/modules/dnf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bumblebee/modules/dnf.py b/bumblebee/modules/dnf.py index c68d009..ead5065 100644 --- a/bumblebee/modules/dnf.py +++ b/bumblebee/modules/dnf.py @@ -38,18 +38,19 @@ def get_dnf_info(obj): enhancements = 0 other = 0 for line in res.decode().split("\n"): + if not line.startswith(" "): continue elif "ecurity" in line: - for s in str.split(line): + for s in line.split(): if s.isdigit(): security += int(s) elif "ugfix" in line: - for s in str.split(line): + for s in line.split(): if s.isdigit(): bugfixes += int(s) elif "hancement" in line: - for s in str.split(line): + for s in line.split(): if s.isdigit(): enhancements += int(s) else: - for s in str.split(line): + for s in line.split(): if s.isdigit(): other += int(s) obj.set("security", security)