~cmiller/mailpile/upstream

« back to all changes in this revision

Viewing changes to mailpile/plugins/crypto_utils.py

  • Committer: Smári McCarthy
  • Date: 2014-02-28 10:53:50 UTC
  • Revision ID: git-v1:601d1679cf8fcdbd7f6f3273c51202abf8735575
Fixed HTTP_QUERY_VARS

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    ORDER = ('', 0)
14
14
    SYNOPSIS = (None, 'crypto/gpg/searchkey', 'crypto/gpg/searchkey', '<terms>')
15
15
    HTTP_CALLABLE = ('GET', )
 
16
    HTTP_QUERY_VARS = {'q': 'search terms'}
16
17
 
17
18
    class CommandResult(Command.CommandResult):
18
19
        def as_text(self):
23
24
 
24
25
    def command(self):
25
26
        args = self.args[:]
26
 
        for q in self.data.get('terms', []):
 
27
        for q in self.data.get('q', []):
27
28
            args.extend(q.split())
28
29
 
29
30
        print "Querying PGP keyservers for: '%s'" % " ".join(args)
35
36
    ORDER = ('', 0)
36
37
    SYNOPSIS = (None, 'crypto/gpg/receivekey', 'crypto/gpg/receivekey', '<keyid>')
37
38
    HTTP_CALLABLE = ('GET', )
 
39
    HTTP_QUERY_VARS = {'keyid': 'ID of key to fetch'}
 
40
 
38
41
 
39
42
    def command(self):
40
43
        keyid = self.data.get("keyid", self.args[0])