public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: cqi@redhat.com
To: libabigail@sourceware.org
Cc: Chenxiong Qi <cqi@redhat.com>
Subject: [PATCH 2/2] Warn properly when cannot find peer RPM
Date: Fri, 01 Jan 2016 00:00:00 -0000	[thread overview]
Message-ID: <1482073971-17039-2-git-send-email-cqi@redhat.com> (raw)
In-Reply-To: <1482073971-17039-1-git-send-email-cqi@redhat.com>

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

  reply	other threads:[~2016-12-18 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01  0:00 [PATCH 1/2] Read Koji config via Koji API cqi
2016-01-01  0:00 ` cqi [this message]
2016-01-01  0:00   ` [PATCH 2/2] Warn properly when cannot find peer RPM Dodji Seketeli
2016-01-01  0:00 ` [PATCH 1/2] Read Koji config via Koji API Dodji Seketeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482073971-17039-2-git-send-email-cqi@redhat.com \
    --to=cqi@redhat.com \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).