Prevent crash on unknown to the repo package

This commit is contained in:
Bo Maryniuk 2017-01-27 14:31:50 +01:00
parent 3e76662166
commit 35f620e1c8

View file

@ -1909,7 +1909,7 @@ def latest(
for pkg in desired_pkgs:
if not avail.get(pkg):
# Package either a) is up-to-date, or b) does not exist
if not cur[pkg]:
if not cur.get(pkg):
# Package does not exist
msg = 'No information found for \'{0}\'.'.format(pkg)
log.error(msg)