diff options
Diffstat (limited to 'alot/settings')
-rw-r--r-- | alot/settings/manager.py | 12 | ||||
-rw-r--r-- | alot/settings/utils.py | 1 |
2 files changed, 9 insertions, 4 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py index cf26f941..c71fba42 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -25,7 +25,8 @@ from .theme import Theme DEFAULTSPATH = os.path.join(os.path.dirname(__file__), '..', 'defaults') -DATA_DIRS = os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':') +DATA_DIRS = os.environ.get('XDG_DATA_DIRS', + '/usr/local/share:/usr/share').split(':') class SettingsManager(object): @@ -37,8 +38,10 @@ class SettingsManager(object): :param notmuch_rc: path to notmuch's config file :type notmuch_rc: str """ - assert alot_rc is None or (isinstance(alot_rc, basestring) and os.path.exists(alot_rc)) - assert notmuch_rc is None or (isinstance(notmuch_rc, basestring) and os.path.exists(notmuch_rc)) + assert alot_rc is None or (isinstance(alot_rc, basestring) and + os.path.exists(alot_rc)) + assert notmuch_rc is None or (isinstance(notmuch_rc, basestring) and + os.path.exists(notmuch_rc)) self.hooks = None self._mailcaps = mailcap.getcaps() self._notmuchconfig = None @@ -62,7 +65,8 @@ class SettingsManager(object): Implementation Detail: this is the same code called by the constructor to set bindings at alot startup. """ - self._bindings = ConfigObj(os.path.join(DEFAULTSPATH, 'default.bindings')) + self._bindings = ConfigObj(os.path.join(DEFAULTSPATH, + 'default.bindings')) self.read_notmuch_config() self.read_config() diff --git a/alot/settings/utils.py b/alot/settings/utils.py index ea56b264..d87157c3 100644 --- a/alot/settings/utils.py +++ b/alot/settings/utils.py @@ -9,6 +9,7 @@ from urwid import AttrSpec from .errors import ConfigError + def read_config(configpath=None, specpath=None, checks=None): """ get a (validated) config object for given config file path. |