diff options
author | Jack Neely <jjneely@ncsu.edu> | 2011-02-10 18:18:16 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-03-17 14:01:06 -0500 |
commit | 7c048802e67f5a35890758b64519d7f61532dbe6 (patch) | |
tree | ad4d8d6bf9bcd967415e2fc09d7b1d8312aeedf1 | |
parent | b4156d9d9cf40cfe73277172467e3feef4da657e (diff) | |
download | bcfg2-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)
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 8 |
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: |