27 lines
808 B
Diff
27 lines
808 B
Diff
|
From 48a8dd97be9ddef45f249d530b9c7d1a593e5ac0 Mon Sep 17 00:00:00 2001
|
||
|
From: Bo Maryniuk <bo@suse.de>
|
||
|
Date: Fri, 27 Jan 2017 14:31:50 +0100
|
||
|
Subject: [PATCH] Prevent crash on unknown to the repo package
|
||
|
|
||
|
---
|
||
|
salt/states/pkg.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/salt/states/pkg.py b/salt/states/pkg.py
|
||
|
index d81f0c00c7..7c3b27b9ac 100644
|
||
|
--- a/salt/states/pkg.py
|
||
|
+++ b/salt/states/pkg.py
|
||
|
@@ -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)
|
||
|
--
|
||
|
2.11.0
|
||
|
|
||
|
|