summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-08-16 11:37:31 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-08-19 12:52:26 -0700
commitdee41bb04906d6976b4f7c05c222f7d95182b3ea (patch)
tree2dbe16e47e3b8fee167d9375e83bd42585e78464 /alot/settings
parent188d79a0189b480656542a09be348fcbf506f33d (diff)
Replace Exception.message with str(Exception)
In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py2
-rw-r--r--alot/settings/utils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index 6f9273c2..6c9e80fe 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -123,7 +123,7 @@ class SettingsManager(object):
except ConfigError as e:
logging.warning(
'Theme file %s failed validation: %s',
- themestring, str(e.message))
+ themestring, e)
else:
break
else:
diff --git a/alot/settings/utils.py b/alot/settings/utils.py
index 23278607..ea56b264 100644
--- a/alot/settings/utils.py
+++ b/alot/settings/utils.py
@@ -44,7 +44,7 @@ def read_config(configpath=None, specpath=None, checks=None):
try:
results = config.validate(validator, preserve_errors=True)
except ConfigObjError as e:
- raise ConfigError(e.message)
+ raise ConfigError(str(e))
if results is not True:
error_msg = ''