diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-08-10 21:12:05 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-08-10 21:12:05 +0100 |
commit | 63e861bfb28b6794a6b62a73ed80ed9c4b419e18 (patch) | |
tree | 0ea68d8a37f4121f7509be9e0c29721693cb322c /alot/settings | |
parent | 80354cbcff7a8150c6d58728c7636f295bc94316 (diff) |
more precise error handling for config parsing
Diffstat (limited to 'alot/settings')
-rw-r--r-- | alot/settings/utils.py | 4 |
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 |