]> git.decadent.org.uk Git - dak.git/commitdiff
utils.py (mail_addresses_for_upload): only try to use address from key if there is one
authorAnsgar Burchardt <ansgar@debian.org>
Sun, 1 Jul 2012 23:09:20 +0000 (01:09 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 6 Jul 2012 16:37:06 +0000 (10:37 -0600)
daklib/utils.py

index 242400a9ed0e012ae85da33680e327ccd2e74788..0d2f1fc6d2e7a52799cdcab6e8f4fd87b7010810 100755 (executable)
@@ -1581,7 +1581,7 @@ def mail_addresses_for_upload(maintainer, changed_by, fingerprint):
         addresses.append(changed_by)
 
     fpr_addresses = gpg_get_key_addresses(fingerprint)
-    if fix_maintainer(changed_by)[3] not in fpr_addresses and fix_maintainer(maintainer)[3] not in fpr_addresses:
+    if len(fpr_addresses) > 0 and fix_maintainer(changed_by)[3] not in fpr_addresses and fix_maintainer(maintainer)[3] not in fpr_addresses:
         addresses.append(fpr_addresses[0])
 
     encoded_addresses = [ fix_maintainer(e)[1] for e in addresses ]