Return early if the check threw an error.
This commit is contained in:
parent
5272e10208
commit
b73dbb1a35
@ -17,8 +17,10 @@ class Dnf(Backend):
|
|||||||
def updates(self):
|
def updates(self):
|
||||||
command = ["dnf", "check-update"]
|
command = ["dnf", "check-update"]
|
||||||
dnf = run_through_shell(command)
|
dnf = run_through_shell(command)
|
||||||
raw = dnf.out
|
if dnf.err:
|
||||||
|
return "?", dnf.err
|
||||||
|
|
||||||
|
raw = dnf.out
|
||||||
update_count = 0
|
update_count = 0
|
||||||
if dnf.rc == 100:
|
if dnf.rc == 100:
|
||||||
lines = raw.splitlines()[2:]
|
lines = raw.splitlines()[2:]
|
||||||
|
Loading…
Reference in New Issue
Block a user