diff options
Diffstat (limited to 'alot/settings/manager.py')
-rw-r--r-- | alot/settings/manager.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py index f8ade6df..e4fa48d7 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -154,6 +154,16 @@ class SettingsManager: tempdir = self._config.get('template_dir') logging.debug('template directory: `%s`' % tempdir) + # validate edit_headers_whitelist/blacklist, which depend on each other + wl = self._config.get('edit_headers_whitelist') + bl = self._config.get('edit_headers_blacklist') + if (wl == ['*']) == (bl == ['*']): + raise ConfigError('Exactly one of "edit_headers_whitelist"', + '"edit_headers_blacklist" must be "*"') + if ('*' in wl and len(wl) > 1) or ('*' in bl and len(bl) > 1): + raise ConfigError('When "*" is used in "edit_headers_whitelist"/' + '"edit_headers_blacklist", it must be the only item.') + # themes themestring = newconfig['theme'] themes_dir = self._config.get('themes_dir') |