summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-01-07 15:49:43 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-01-07 15:49:43 +0000
commita634f9679bd2f797853361663c515d0a3af7b3f8 (patch)
treea4be86b2802f2db0648725f36dd7fefed34c2315 /alot
parent3b92b59d2ff2ee46c13b431f48406a6fc749a1a1 (diff)
adjust PrintCommand wrt new PipeCommand args
decode is obsolete and we use the new format parameter instead. this also fixes some neglected docstrings
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/thread.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 26cdaa7c..e368cb0b 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -300,7 +300,7 @@ class ChangeDisplaymodeCommand(Command):
(['cmd'], {'help':'shellcommand to pipe to'}),
(['--all'], {'action': 'store_true', 'help':'pass all messages'}),
(['--format'], {'help':'output format', 'default':'raw',
- 'choices':[ 'raw','decoded', 'id', 'filepath']}),
+ 'choices':['raw', 'decoded', 'id', 'filepath']}),
(['--separately'], {'action': 'store_true',
'help':'call command once for each message'}),
(['--background'], {'action': 'store_true',
@@ -480,8 +480,8 @@ class PrintCommand(PipeCommand):
:type all: bool
:param separately: call print command once per message
:type separately: bool
- :param separately: pipe raw message string to print command
- :type separately: bool
+ :param raw: pipe raw message string to print command
+ :type raw: bool
"""
# get print command
cmd = settings.config.get('general', 'print_cmd', fallback='')
@@ -498,11 +498,11 @@ class PrintCommand(PipeCommand):
# no print cmd set
noop_msg = 'no print command specified. Set "print_cmd" in the '\
'global section.'
- PipeCommand.__init__(self, cmdlist, all=all,
- separately=separately,
- decode=not raw,
- noop_msg=noop_msg, confirm_msg=confirm_msg,
- done_msg=ok_msg, **kwargs)
+
+ PipeCommand.__init__(self, cmdlist, all=all, separately=separately,
+ format='raw' if raw else 'decoded', noop_msg=noop_msg,
+ confirm_msg=confirm_msg, done_msg=ok_msg,
+ **kwargs)
@registerCommand(MODE, 'save', arguments=[