summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-08-16 11:07:52 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-08-16 11:24:33 -0700
commit6d20c4ae8f1130bd29b14ea52014b394e0a1c4a4 (patch)
treea10dea292e9834e00368e134cd0ce85ef2c8e8d3 /alot/settings
parent8ceb87c911fbfa010e4a9bf1ad098f4b632724d1 (diff)
settings: Load spec file even if config file is undefined.
This is necessary even if the config file is None to ensure that the spec file is loaded Also mock out the setting.const module in the docs, otherwise they'll fail to generate. Fixes #1094
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index 0d926ae4..55f7a30b 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -67,15 +67,11 @@ class SettingsManager(object):
def read_notmuch_config(self):
"""parse notmuch's config file from path"""
- if self.notmuch_rc_path is not None:
- spec = os.path.join(DEFAULTSPATH, 'notmuch.rc.spec')
- self._notmuchconfig = read_config(self.notmuch_rc_path, spec)
+ spec = os.path.join(DEFAULTSPATH, 'notmuch.rc.spec')
+ self._notmuchconfig = read_config(self.notmuch_rc_path, spec)
def read_config(self):
"""parse alot's config file from path"""
- if self.alot_rc_path is None:
- return
-
spec = os.path.join(DEFAULTSPATH, 'alot.rc.spec')
newconfig = read_config(
self.alot_rc_path, spec, checks={