diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2017-08-31 15:19:15 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2017-09-01 15:33:15 +0100 |
commit | 134d791f94dec9bf06b98a9881495a435c191bd3 (patch) | |
tree | 598cb50b34a1e8346c114dbf50c0a013cb3d5f48 /alot/commands/globals.py | |
parent | 0df1c905aee10308069d9db9e396714feabc4ce4 (diff) |
pep8 fixes
This mostly shortens lines down to <=79 chars and fixes some other small
things I found using the pep8 tool.
Diffstat (limited to 'alot/commands/globals.py')
-rw-r--r-- | alot/commands/globals.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 565bd742..57ddfcb6 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -78,7 +78,8 @@ class ExitCommand(Command): if ui.db_was_locked: msg = 'Database locked. Exit without saving?' - if (yield ui.choice(msg, msg_position='left', cancel='no')) == 'no': + response = yield ui.choice(msg, msg_position='left', cancel='no') + if response == 'no': return ui.exit() @@ -855,7 +856,8 @@ class ComposeCommand(Command): self.envelope.sign = account.sign_by_default self.envelope.sign_key = account.gpg_key else: - msg = 'Cannot find gpg key for account {}'.format(account.address) + msg = 'Cannot find gpg key for account {}' + msg = msg.format(account.address) logging.warning(msg) ui.notify(msg, priority='error') @@ -910,7 +912,8 @@ class ComposeCommand(Command): logging.debug("Trying to encrypt message because " "account.encrypt_by_default=%s", account.encrypt_by_default) - yield set_encrypt(ui, self.envelope, block_error=self.encrypt, signed_only=True) + yield set_encrypt(ui, self.envelope, block_error=self.encrypt, + signed_only=True) else: logging.debug("No encryption by default, encrypt_by_default=%s", account.encrypt_by_default) |