From 1380c07106a7209b878ca6e4248e55b23fd1e0c2 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Mon, 13 Aug 2012 11:33:03 +0200 Subject: [PATCH] daklib/utils.py (gpg_get_key_addresses): prefer @debian.org addresses --- daklib/utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daklib/utils.py b/daklib/utils.py index 31c22cbb..be3c6516 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -1396,7 +1396,14 @@ def gpg_get_key_addresses(fingerprint): if result == 0: for l in output.split('\n'): m = re_gpg_uid.match(l) - if m: + if not m: + continue + address = m.group(1) + if address.endswith('@debian.org'): + # prefer @debian.org addresses + # TODO: maybe not hardcode the domain + addresses.insert(0, address) + else: addresses.append(m.group(1)) key_uid_email_cache[fingerprint] = addresses return addresses -- 2.39.5