Permalink
Browse files

lilac2.nvchecker: fix i being unbound

  • Loading branch information...
lilydjwg committed Sep 21, 2018
1 parent fd445be commit e3a316293882c97222492ec30a54ba019a161322
Showing with 5 additions and 2 deletions.
  1. +5 −2 lilac2/nvchecker.py
View
@@ -98,12 +98,15 @@ def packages_need_update(repo, mods):
pkg = j.get('name')
if ':' in pkg:
pkg, i = pkg.split(':', 1)
i = int(i)
else:
i = 0
event = j['event']
if event == 'updated':
if i == '0':
if i == 0:
nvdata[pkg] = NvResult(j['old_version'], j['version'])
elif event == 'up-to-date':
if i == '0':
if i == 0:
nvdata[pkg] = NvResult(j['version'], j['version'])
elif j['level'] in ['warn', 'error', 'exception', 'critical']:
errors[pkg].append(j)

0 comments on commit e3a3162

Please sign in to comment.