diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-09-23 16:58:28 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-09-23 16:58:28 +0100 |
commit | 6a32255f17e3b1e2e61b437456fea904535a6ec5 (patch) | |
tree | 9ce456c96a5c4c8839f527ac31b711436da3e096 | |
parent | 667c8378410e3e2828604e82cb694b4626d1cd08 (diff) |
pep8 cleanup
-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() |