diff options
author | drebs <drebs@leap.se> | 2014-10-09 20:12:29 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-10-09 20:12:29 -0300 |
commit | c4466bd5735652bff79da36a99da3f8b245d6115 (patch) | |
tree | 1a34002312d466b84ae99bc9dd130570141005e0 /src/leap/keymanager/openpgp.py | |
parent | 2c7c18b04d0435de65b58d57f22e229577189ca2 (diff) | |
parent | 2c8cfffad0cf214951628b771db2322533a8fe50 (diff) |
Merge remote-tracking branch 'meskio/feature/5932_fetch_keys_uri' into develop
Diffstat (limited to 'src/leap/keymanager/openpgp.py')
-rw-r--r-- | src/leap/keymanager/openpgp.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/keymanager/openpgp.py b/src/leap/keymanager/openpgp.py index ee37a342..6a825cda 100644 --- a/src/leap/keymanager/openpgp.py +++ b/src/leap/keymanager/openpgp.py @@ -327,7 +327,10 @@ class OpenPGPScheme(EncryptionScheme): privkey = gpg.list_keys(secret=True).pop() except IndexError: pass - pubkey = gpg.list_keys(secret=False).pop() # unitary keyring + try: + pubkey = gpg.list_keys(secret=False).pop() # unitary keyring + except IndexError: + return (None, None) # extract adress from first uid on key match = re.match(mail_regex, pubkey['uids'].pop()) |