diff options
-rw-r--r-- | alot/addressbooks.py | 3 | ||||
-rw-r--r-- | alot/errors.py | 2 | ||||
-rw-r--r-- | alot/helper.py | 2 | ||||
-rw-r--r-- | alot/settings/__init__.py | 2 | ||||
-rw-r--r-- | alot/settings/checks.py | 1 | ||||
-rw-r--r-- | alot/settings/errors.py | 2 | ||||
-rw-r--r-- | alot/settings/utils.py | 4 | ||||
-rw-r--r-- | alot/ui.py | 1 | ||||
-rw-r--r-- | alot/widgets.py | 4 |
9 files changed, 11 insertions, 10 deletions
diff --git a/alot/addressbooks.py b/alot/addressbooks.py index 00fe9fe7..a8453b09 100644 --- a/alot/addressbooks.py +++ b/alot/addressbooks.py @@ -50,7 +50,8 @@ class AbookAddressBook(AddressBook): res = [] for id in c.sections: for email in c[id]['email']: - if email: res.append((c[id]['name'], email)) + if email: + res.append((c[id]['name'], email)) return res diff --git a/alot/errors.py b/alot/errors.py index 00336fc8..881acf1f 100644 --- a/alot/errors.py +++ b/alot/errors.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + + class GPGProblem(Exception): """GPG Error""" pass diff --git a/alot/helper.py b/alot/helper.py index f4ec07cd..78744edf 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -22,7 +22,6 @@ from twisted.internet.protocol import ProcessProtocol from twisted.internet.defer import Deferred import StringIO import logging -import tempfile def split_commandstring(cmdstring): @@ -35,6 +34,7 @@ def split_commandstring(cmdstring): cmdstring = cmdstring.encode('utf-8', errors='ignore') return shlex.split(cmdstring) + def safely_get(clb, E, on_error=''): """ returns result of :func:`clb` and falls back to `on_error` diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py index dc729b0e..0edfc24c 100644 --- a/alot/settings/__init__.py +++ b/alot/settings/__init__.py @@ -7,9 +7,7 @@ import re import errno import mailcap import logging -import urwid import shutil -from urwid import AttrSpecError from configobj import ConfigObj, Section from alot.account import SendmailAccount diff --git a/alot/settings/checks.py b/alot/settings/checks.py index ca412b68..76d22780 100644 --- a/alot/settings/checks.py +++ b/alot/settings/checks.py @@ -24,7 +24,6 @@ def attr_triple(value): :raises: VdtValueTooLongError, VdtTypeError :rtype: triple of `urwid.AttrSpec` """ - fg = bg = 'default' keys = ['dfg', 'dbg', '1fg', '1bg', '16fg', '16bg', '256fg', '256bg'] acc = {} if not isinstance(value, (list, tuple)): diff --git a/alot/settings/errors.py b/alot/settings/errors.py index 9095e897..606f78e1 100644 --- a/alot/settings/errors.py +++ b/alot/settings/errors.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file + + class ConfigError(Exception): """could not parse user config""" pass diff --git a/alot/settings/utils.py b/alot/settings/utils.py index d274fb7c..f6cc3613 100644 --- a/alot/settings/utils.py +++ b/alot/settings/utils.py @@ -24,9 +24,9 @@ def read_config(configpath=None, specpath=None, checks={}): try: config = ConfigObj(infile=configpath, configspec=specpath, file_error=True, encoding='UTF8') - except (ConfigObjError, IOError), e: + except (ConfigObjError, IOError): raise ConfigError('Couls not read %s' % configpath) - except UnboundLocalError as e: + except UnboundLocalError: # this works around a bug in configobj msg = '%s is malformed. Check for sections without parents..' raise ConfigError(msg % configpath) @@ -4,7 +4,6 @@ import urwid import logging from twisted.internet import reactor, defer -import sys from settings import settings from buffers import BufferlistBuffer diff --git a/alot/widgets.py b/alot/widgets.py index 0145bb33..5edefbef 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -12,7 +12,6 @@ import alot.db.message as message from alot.db.attachment import Attachment import time from alot.db.utils import decode_header -from alot.settings.utils import resolve_att class AttrFlipWidget(urwid.AttrMap): @@ -664,7 +663,8 @@ class MessageSummaryWidget(urwid.WidgetWrap): attr = settings.get_theming_attribute('thread', 'summary', 'even') else: attr = settings.get_theming_attribute('thread', 'summary', 'odd') - focus_att = settings.get_theming_attribute('thread', 'summary', 'focus') + focus_att = settings.get_theming_attribute('thread', 'summary', + 'focus') cols = [] sumstr = self.__str__() |