supybot-bitcoin-marketmonitor icon indicating copy to clipboard operation
supybot-bitcoin-marketmonitor copied to clipboard

GPG plugin, recv_keys fails if first member of list is not new key import details.

Open obosob opened this issue 9 years ago • 0 comments

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)

obosob avatar Jun 24 '15 14:06 obosob