[modules/dnf] Fix for python2
This usage of split actually broke python2.... Wonder why I never noticed that before.
This commit is contained in:
parent
6de18f831d
commit
749a9761b2
1 changed files with 5 additions and 4 deletions
|
@ -38,18 +38,19 @@ def get_dnf_info(obj):
|
||||||
enhancements = 0
|
enhancements = 0
|
||||||
other = 0
|
other = 0
|
||||||
for line in res.decode().split("\n"):
|
for line in res.decode().split("\n"):
|
||||||
|
|
||||||
if not line.startswith(" "): continue
|
if not line.startswith(" "): continue
|
||||||
elif "ecurity" in line:
|
elif "ecurity" in line:
|
||||||
for s in str.split(line):
|
for s in line.split():
|
||||||
if s.isdigit(): security += int(s)
|
if s.isdigit(): security += int(s)
|
||||||
elif "ugfix" in line:
|
elif "ugfix" in line:
|
||||||
for s in str.split(line):
|
for s in line.split():
|
||||||
if s.isdigit(): bugfixes += int(s)
|
if s.isdigit(): bugfixes += int(s)
|
||||||
elif "hancement" in line:
|
elif "hancement" in line:
|
||||||
for s in str.split(line):
|
for s in line.split():
|
||||||
if s.isdigit(): enhancements += int(s)
|
if s.isdigit(): enhancements += int(s)
|
||||||
else:
|
else:
|
||||||
for s in str.split(line):
|
for s in line.split():
|
||||||
if s.isdigit(): other += int(s)
|
if s.isdigit(): other += int(s)
|
||||||
|
|
||||||
obj.set("security", security)
|
obj.set("security", security)
|
||||||
|
|
Loading…
Reference in a new issue