From 7c048802e67f5a35890758b64519d7f61532dbe6 Mon Sep 17 00:00:00 2001 From: Jack Neely Date: Thu, 10 Feb 2011 18:18:16 -0500 Subject: Add error checking to make sure gpg-pubkeys have all needed information (cherry picked from commit 81fce09fb9671c652703c37a5f9b48d020a34307) --- src/lib/Client/Tools/YUMng.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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: -- cgit v1.2.3-1-g7c22