summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-08-10 21:12:05 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-08-10 21:12:05 +0100
commit63e861bfb28b6794a6b62a73ed80ed9c4b419e18 (patch)
tree0ea68d8a37f4121f7509be9e0c29721693cb322c /alot/settings
parent80354cbcff7a8150c6d58728c7636f295bc94316 (diff)
more precise error handling for config parsing
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/settings/utils.py b/alot/settings/utils.py
index 6b5f77cb..2647bb75 100644
--- a/alot/settings/utils.py
+++ b/alot/settings/utils.py
@@ -24,7 +24,9 @@ def read_config(configpath=None, specpath=None, checks={}):
try:
config = ConfigObj(infile=configpath, configspec=specpath,
file_error=True, encoding='UTF8')
- except (ConfigObjError, IOError):
+ except ConfigObjError as e:
+ raise ConfigError(e)
+ except IOError:
raise ConfigError('Could not read %s' % configpath)
except UnboundLocalError:
# this works around a bug in configobj