[modules/dnf] Fix for python2

This usage of split actually broke python2.... Wonder why I never
noticed that before.
This commit is contained in:
Tobias Witek 2016-11-05 20:04:04 +01:00
parent 6de18f831d
commit 749a9761b2

View file

@ -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)