diff options
-rw-r--r-- | alot/command.py | 10 | ||||
-rw-r--r-- | alot/helper.py | 1 | ||||
-rw-r--r-- | alot/settings.py | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/alot/command.py b/alot/command.py index 046b50db..e491d583 100644 --- a/alot/command.py +++ b/alot/command.py @@ -179,9 +179,11 @@ class ExternalCommand(Command): def thread_code(*args): if self.path: if '{}' in self.commandstring: - cmd = self.commandstring.replace('{}', helper.shell_quote(self.path)) + cmd = self.commandstring.replace('{}', + helper.shell_quote(self.path)) else: - cmd = '%s %s' % (self.commandstring, helper.shell_quote(self.path)) + cmd = '%s %s' % (self.commandstring, + helper.shell_quote(self.path)) else: cmd = self.commandstring @@ -213,8 +215,8 @@ class EditCommand(ExternalCommand): self.spawn = settings.config.getboolean('general', 'spawn_editor') editor_cmd = settings.config.get('general', 'editor_cmd') - ExternalCommand.__init__(self, editor_cmd, path=self.path, spawn=self.spawn, - in_thread=self.spawn, + ExternalCommand.__init__(self, editor_cmd, path=self.path, + spawn=self.spawn, in_thread=self.spawn, **kwargs) diff --git a/alot/helper.py b/alot/helper.py index d7916123..91da0811 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -114,6 +114,7 @@ def attach(path, mail, filename=None): filename=filename) mail.attach(part) + def shell_quote(text): r''' >>> print(shell_quote("hello")) diff --git a/alot/settings.py b/alot/settings.py index d7a682c6..5afd4463 100644 --- a/alot/settings.py +++ b/alot/settings.py @@ -24,6 +24,7 @@ import codecs from ConfigParser import SafeConfigParser + class FallbackConfigParser(SafeConfigParser): def __init__(self): SafeConfigParser.__init__(self) @@ -151,7 +152,9 @@ class HookManager(object): config = AlotConfigParser() config.read(os.path.join(os.path.dirname(__file__), 'defaults', 'alot.rc')) notmuchconfig = FallbackConfigParser() -notmuchconfig.read(os.path.join(os.path.dirname(__file__), 'defaults', 'notmuch.rc')) +notmuchconfig.read(os.path.join(os.path.dirname(__file__), + 'defaults', + 'notmuch.rc')) hooks = HookManager() mailcaps = mailcap.getcaps() |