summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2017-09-02 08:35:01 +0100
committerGitHub <noreply@github.com>2017-09-02 08:35:01 +0100
commit668925817cd8aeed7ef9926969d49c4586c26adf (patch)
tree0cd16d2279a971d0b5d650f03ee3f6ce0e592852 /alot/settings
parent3a3898f2ce976fbb800f55764675c4962e7adf28 (diff)
parentc09196eb92af61ce0efa2f2ea47f42856ef87ac9 (diff)
Merge branch 'master' into fix/spelling
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py12
-rw-r--r--alot/settings/utils.py1
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.