From edc05e3239c94d3b143ab63df661995782352766 Mon Sep 17 00:00:00 2001 From: David Boucha Date: Thu, 20 Dec 2012 15:45:56 -0700 Subject: [PATCH] try to avoid keyerrors --- salt/modules/win_pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/modules/win_pkg.py b/salt/modules/win_pkg.py index 417ecc72c4dc..eb13a5feaae7 100644 --- a/salt/modules/win_pkg.py +++ b/salt/modules/win_pkg.py @@ -66,7 +66,7 @@ def available_version(name): return 'Windows package repo not available' if not repodata: return 'Windows package repo not available' - if repodata[name]: + if name in repodata: return repodata[name] else: return name, ' is not available.'