summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-07-21 17:17:28 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-07-21 17:17:28 +0100
commit722ce9d49ef9e4e92c5c13aa074aa6b82e43b7bc (patch)
treede4016f0b8da72f9eda503b6f35281d7dfd4dc31 /alot/settings
parent5399ad7385657f3a32e978e5f79e656533bc47be (diff)
correctly report interpolation errors
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/alot/settings/utils.py b/alot/settings/utils.py
index f6cc3613..f6912f98 100644
--- a/alot/settings/utils.py
+++ b/alot/settings/utils.py
@@ -34,7 +34,11 @@ def read_config(configpath=None, specpath=None, checks={}):
if specpath:
validator = Validator()
validator.functions.update(checks)
- results = config.validate(validator, preserve_errors=True)
+ try:
+ results = config.validate(validator, preserve_errors=True)
+ except ConfigObjError as e:
+ raise ConfigError(e.message)
+
if results != True:
error_msg = ''