summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/YUMng.py
diff options
context:
space:
mode:
authorJack Neely <jjneely@ncsu.edu>2011-02-10 18:18:16 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-03-17 14:01:06 -0500
commit7c048802e67f5a35890758b64519d7f61532dbe6 (patch)
treead4d8d6bf9bcd967415e2fc09d7b1d8312aeedf1 /src/lib/Client/Tools/YUMng.py
parentb4156d9d9cf40cfe73277172467e3feef4da657e (diff)
downloadbcfg2-7c048802e67f5a35890758b64519d7f61532dbe6.tar.gz
bcfg2-7c048802e67f5a35890758b64519d7f61532dbe6.tar.bz2
bcfg2-7c048802e67f5a35890758b64519d7f61532dbe6.zip
Add error checking to make sure gpg-pubkeys have all needed information
(cherry picked from commit 81fce09fb9671c652703c37a5f9b48d020a34307)
Diffstat (limited to 'src/lib/Client/Tools/YUMng.py')
-rw-r--r--src/lib/Client/Tools/YUMng.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py
index 44d56ff9f..8db1683e4 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -463,6 +463,14 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
self.logger.debug(" Not checking version for virtual package")
_POs = [po for po in POs] # Make a copy
elif entry.get('name') == 'gpg-pubkey':
+ if 'version' not in nevra:
+ m = "Skipping verify: gpg-pubkey without an RPM version."
+ self.logger.warning(m)
+ continue
+ if 'release' not in nevra:
+ m = "Skipping verify: gpg-pubkey without an RPM release."
+ self.logger.warning(m)
+ continue
_POs = [p for p in POs if p.version == nevra['version'] \
and p.release == nevra['release']]
else: