[PATCH 2/2] Warn properly when cannot find peer RPM
cqi@redhat.com
cqi@redhat.com
Fri Jan 1 00:00:00 GMT 2016
From: Chenxiong Qi <cqi@redhat.com>
* tools/fedabipkgdiff: (RPMCollection.get_peer_rpm): Return None
when cannot find peer RPM due to nonexistent arch.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
---
tools/fedabipkgdiff | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff
index 894ca2a..0584bf1 100755
--- a/tools/fedabipkgdiff
+++ b/tools/fedabipkgdiff
@@ -482,6 +482,8 @@ class RPMCollection(object):
def get_peer_rpm(self, rpm):
"""Get peer rpm of rpm from this collection"""
+ if rpm.arch not in self.rpms:
+ return None
for _rpm in self.rpms[rpm.arch]:
if _rpm.is_peer(rpm):
return _rpm
--
2.7.4
More information about the Libabigail
mailing list