From 514f6349d41dabd8f40d328ba1977c8ae79b3257 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 22 Jan 2016 18:39:30 +0100 Subject: [PATCH] Bugfix: crash on "key not found" error --- salt/states/pkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/states/pkg.py b/salt/states/pkg.py index 625c02f397..e688bd9458 100644 --- a/salt/states/pkg.py +++ b/salt/states/pkg.py @@ -1437,8 +1437,8 @@ def latest( targets[pkg] = avail[pkg] else: for pkg in desired_pkgs: - if not avail[pkg]: - if not cur[pkg]: + if pkg not in avail: + if not cur.get(pkg): msg = 'No information found for \'{0}\'.'.format(pkg) log.error(msg) problems.append(msg)