supybot-bitcoin-marketmonitor
supybot-bitcoin-marketmonitor copied to clipboard
GPG plugin, recv_keys fails if first member of list is not new key import details.
For example: in result.results for a key with an expired UID or expired signature that is superseded by a more recent one, there are many entries, one of which has_key('ok').
Code snippet (line 244 is the issue):
def _recv_key(self, keyservers, keyid):
for ks in keyservers:
try:
result = self.gpg.recv_keys(ks, keyid)
--> if result.results[0].has_key('ok'): <--
return result.results[0]['fingerprint']
except:
continue
else:
raise Exception(result.stderr)