diff options
Diffstat (limited to 'alot/settings/manager.py')
-rw-r--r-- | alot/settings/manager.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py index 98d534fb..dffe1b32 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -79,7 +79,7 @@ class SettingsManager(object): """parse alot's config file from path""" spec = os.path.join(DEFAULTSPATH, 'alot.rc.spec') newconfig = read_config( - self.alot_rc_path, spec, checks={ + self.alot_rc_path, spec, report_extra=True, checks={ 'mail_container': checks.mail_container, 'force_list': checks.force_list, 'align': checks.align_mode, @@ -116,22 +116,19 @@ class SettingsManager(object): # tl/dr; If the loop loads a theme it breaks. If it doesn't break, # then it raises a ConfigError. for dir_ in itertools.chain([themes_dir], data_dirs): - if not os.path.isdir(dir_): - logging.warning( - 'cannot find theme %s: themes_dir %s is missing', - themestring, dir_) + theme_path = os.path.join(dir_, themestring) + if not os.path.exists(os.path.expanduser(theme_path)): + logging.warning('Theme `%s` does not exist.', theme_path) else: - theme_path = os.path.join(dir_, themestring) try: self._theme = Theme(theme_path) except ConfigError as e: - logging.warning( - 'Theme file %s failed validation: %s', - themestring, e) + raise ConfigError('Theme file `%s` failed ' + 'validation:\n%s' % (theme_path, e)) else: break else: - raise ConfigError('Cannot load theme {}, see log for more ' + raise ConfigError('Could not find theme {}, see log for more ' 'information'.format(themestring)) # if still no theme is set, resort to default |