From 088d1006733a0297bcc54c83eadabd027de245bd Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Thu, 28 Jun 2012 12:07:42 +0200 Subject: [PATCH] gpg_get_key_addresses: return a list instead of a set gpg tries to return the primary uid (or newest uid if there is no explicit primary) first. dak should prefer this address, but we need a list to know the order of addresses gpg returned. Signed-off-by: Ansgar Burchardt --- daklib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daklib/utils.py b/daklib/utils.py index 6fecfb87..b1b7b1d0 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -1387,7 +1387,7 @@ def gpg_get_key_addresses(fingerprint): addresses = key_uid_email_cache.get(fingerprint) if addresses != None: return addresses - addresses = set() + addresses = list() cmd = "gpg --no-default-keyring %s --fingerprint %s" \ % (gpg_keyring_args(), fingerprint) (result, output) = commands.getstatusoutput(cmd) @@ -1395,7 +1395,7 @@ def gpg_get_key_addresses(fingerprint): for l in output.split('\n'): m = re_gpg_uid.match(l) if m: - addresses.add(m.group(1)) + addresses.append(m.group(1)) key_uid_email_cache[fingerprint] = addresses return addresses -- 2.39.5