[dak/master] 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 <ansgar@debian.org>
---
daklib/utils.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/daklib/utils.py b/daklib/utils.py
index 6fecfb8..b1b7b1d 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
--
1.7.2.5
Reply to: