Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
obosob opened this issue Jun 24, 2015 · 0 comments

Comments

@obosob
Copy link

obosob commented Jun 24, 2015

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 pushed a commit to obosob/supybot-bitcoin-marketmonitor that referenced this issue Jun 24, 2015
Loop instead of assuming the first entry in the list will be "ok"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant