summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2013-02-14 14:37:50 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2013-02-19 10:10:08 +0000
commit59f213445f20736abbf2883439ab3fe5bb1c4744 (patch)
treecf4739475dda7f60d387b5f196af054305fe67c2 /alot
parentbf454b75c05556025488a682a458e9adae40ba4d (diff)
add missing help strings for crypto commands
this fixes the auto-generation of the sphinx docs
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/envelope.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 5d90ca8b..88e7ab43 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -454,16 +454,20 @@ class SignCommand(Command):
@registerCommand(MODE, 'encrypt', forced={'action': 'encrypt'}, arguments=[
(['keyids'], {'nargs':argparse.REMAINDER,
- 'help': 'keyid of the key to encrypt with'})])
-@registerCommand(MODE, 'unencrypt', forced={'action': 'unencrypt'})
+ 'help': 'keyid of the key to encrypt with'})],
+ help='request encryption of message before sendout')
+@registerCommand(MODE, 'unencrypt', forced={'action': 'unencrypt'},
+ help='remove request to encrypt message before sending')
@registerCommand(MODE, 'toggleencrypt', forced={'action': 'toggleencrypt'},
arguments=[
(['keyids'], {'nargs': argparse.REMAINDER,
- 'help':'keyid of the key to encrypt with'})])
+ 'help':'keyid of the key to encrypt with'})],
+ help='toggle whether message should be encrypted before sendout')
@registerCommand(MODE, 'rmencrypt', forced={'action': 'rmencrypt'},
arguments=[
(['keyids'], {'nargs': argparse.REMAINDER,
- 'help':'keyid of the key to encrypt with'})])
+ 'help':'keyid of the key to encrypt with'})],
+ help='do not encrypt to given recipient key')
class EncryptCommand(Command):
def __init__(self, action=None, keyids=None, **kwargs):
"""
@@ -476,7 +480,7 @@ class EncryptCommand(Command):
self.encrypt_keys = keyids
self.action = action
Command.__init__(self, **kwargs)
-
+
@inlineCallbacks
def apply(self, ui):
envelope = ui.current_buffer.envelope
@@ -516,8 +520,8 @@ class EncryptCommand(Command):
if e.code == GPGCode.AMBIGUOUS_NAME:
possible_keys = crypto.list_keys(hint=keyid)
tmp_choices = [k.uids[0].uid for k in possible_keys]
- choices = {str(len(tmp_choices) - x) : tmp_choices[x]
- for x in range(0, len(tmp_choices))}
+ choices = {str(len(tmp_choices) - x) : tmp_choices[x]
+ for x in range(0, len(tmp_choices))}
keyid = yield ui.choice("This keyid was ambiguous. " +
"Which key do you want to use?",
choices, cancel=None)