summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/globals.py15
-rw-r--r--alot/commands/thread.py5
-rw-r--r--alot/errors.py2
-rw-r--r--alot/ui.py1
4 files changed, 10 insertions, 13 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index af9eb7f9..7d5c1d3e 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -851,19 +851,18 @@ class ComposeCommand(Command):
# set encryption if needed
if self.encrypt or account.encrypt_by_default == u"all":
- logging.debug("Trying to encrypt message because encrypt={} and "
- "encrypt_by_default={}".format(
- self.encrypt, account.encrypt_by_default))
+ logging.debug("Trying to encrypt message because encrypt=%s and "
+ "encrypt_by_default=%s", self.encrypt,
+ account.encrypt_by_default)
yield self._set_encrypt(ui, self.envelope)
elif account.encrypt_by_default == u"trusted":
logging.debug("Trying to encrypt message because "
- "account.encrypt_by_default={}".format(
- account.encrypt_by_default))
+ "account.encrypt_by_default=%s",
+ account.encrypt_by_default)
yield self._set_encrypt(ui, self.envelope, trusted_only=True)
else:
- logging.debug(
- "No encryption by default, encrypt_by_default={}".format(
- account.encrypt_by_default))
+ logging.debug("No encryption by default, encrypt_by_default=%s",
+ account.encrypt_by_default)
cmd = commands.envelope.EditCommand(envelope=self.envelope,
spawn=self.force_spawn,
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index ad7110ed..00ac3f45 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -8,7 +8,7 @@ import os
import re
import subprocess
import tempfile
-from email.Utils import getaddresses, parseaddr
+from email.utils import getaddresses, parseaddr
from email.message import Message
from twisted.internet.defer import inlineCallbacks
@@ -82,8 +82,7 @@ def determine_sender(mail, action='reply'):
regex = re.compile('^' + alias + '$', flags=re.IGNORECASE)
for seen_name, seen_address in candidate_addresses:
if regex.match(seen_address):
- logging.debug("match!: '%s' '%s'" % (seen_address,
- alias))
+ logging.debug("match!: '%s' '%s'", seen_address, alias)
if settings.get(action + '_force_realname'):
realname = account.realname
else:
diff --git a/alot/errors.py b/alot/errors.py
index e3acba8b..9860f411 100644
--- a/alot/errors.py
+++ b/alot/errors.py
@@ -3,7 +3,7 @@
# For further details see the COPYING file
-class GPGCode:
+class GPGCode(object):
AMBIGUOUS_NAME = 1
NOT_FOUND = 2
BAD_PASSPHRASE = 3
diff --git a/alot/ui.py b/alot/ui.py
index aa9d89c8..09fc27cc 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -368,7 +368,6 @@ class UI(object):
buf.cleanup()
success = True
else:
- string = 'closing buffer %d:%s'
buffers.remove(buf)
buf.cleanup()
success = True