Return early if the check threw an error.

This commit is contained in:
ncoop 2016-06-04 20:53:12 -07:00
parent 5272e10208
commit b73dbb1a35

View File

@ -17,8 +17,10 @@ class Dnf(Backend):
def updates(self):
command = ["dnf", "check-update"]
dnf = run_through_shell(command)
raw = dnf.out
if dnf.err:
return "?", dnf.err
raw = dnf.out
update_count = 0
if dnf.rc == 100:
lines = raw.splitlines()[2:]