[buildinfo.debian.net] 28/35: Rework into loop; we might know about other keys!

Chris Lamb chris at chris-lamb.co.uk
Thu Nov 3 19:02:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository buildinfo.debian.net.

commit 391d8608d176b092cdcef23a54d7dbb49d630ef0
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Nov 1 19:45:22 2016 +0000

    Rework into loop; we might know about other keys!
---
 bidb/api/utils.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/bidb/api/utils.py b/bidb/api/utils.py
index 58a736b..92abbeb 100644
--- a/bidb/api/utils.py
+++ b/bidb/api/utils.py
@@ -31,9 +31,13 @@ def parse_submission(request):
     data.raw_text = raw_text
     gpg_info = data.get_gpg_info()
     if 'NODATA' not in gpg_info:
-        try:
-            uid = gpg_info['NO_PUBKEY'][0]
-        except (KeyError, IndexError):
+        for x in ('NO_PUBKEY',):
+            try:
+                uid = gpg_info[x][0]
+                break
+            except (KeyError, IndexError):
+                pass
+        else:
             raise InvalidSubmission("Could not determine GPG uid")
 
     ## Check whether .buildinfo already exists ################################

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/buildinfo.debian.net.git



More information about the Reproducible-commits mailing list