From: Ansgar Burchardt Date: Mon, 13 Aug 2012 09:33:03 +0000 (+0200) Subject: daklib/utils.py (gpg_get_key_addresses): prefer @debian.org addresses X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1380c07106a7209b878ca6e4248e55b23fd1e0c2;p=dak.git daklib/utils.py (gpg_get_key_addresses): prefer @debian.org addresses --- 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