[modules/dnf] Fix a bug wrt. counter extraction

Bugfixes and enhancements were wrongly extracted.
This commit is contained in:
Tobias Witek 2016-11-03 19:44:34 +01:00
parent 6fa7f9d789
commit 5532526595

View file

@ -28,6 +28,7 @@ def get_dnf_info(obj):
other = 0 other = 0
for line in res.split("\n"): for line in res.split("\n"):
if "expiration" in line: continue if "expiration" in line: continue
if not line.startswith(" "): continue
elif "ecurity" in line: elif "ecurity" in line:
for s in str.split(line): for s in str.split(line):
if s.isdigit(): security += int(s) if s.isdigit(): security += int(s)
@ -68,7 +69,7 @@ class Module(bumblebee.module.Module):
def data(self): def data(self):
result = [] result = []
for t in [ "security", "bugfix", "enhancement", "other" ]: for t in [ "security", "bugfixes", "enhancements", "other" ]:
result.append(str(self.get(t))) result.append(str(self.get(t)))
return "/".join(result) return "/".join(result)