diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-08-16 11:37:31 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-08-19 12:52:26 -0700 |
commit | dee41bb04906d6976b4f7c05c222f7d95182b3ea (patch) | |
tree | 2dbe16e47e3b8fee167d9375e83bd42585e78464 /alot/utils | |
parent | 188d79a0189b480656542a09be348fcbf506f33d (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/utils')
-rw-r--r-- | alot/utils/configobj.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/utils/configobj.py b/alot/utils/configobj.py index 5e04409a..d7ce48a4 100644 --- a/alot/utils/configobj.py +++ b/alot/utils/configobj.py @@ -47,7 +47,7 @@ def attr_triple(value): normal = AttrSpec(acc['16fg'], acc['16bg'], 16) high = AttrSpec(acc['256fg'], acc['256bg'], 256) except AttrSpecError as e: - raise ValidateError(e.message) + raise ValidateError(str(e)) return mono, normal, high @@ -141,4 +141,4 @@ def gpg_key(value): try: return crypto.get_key(value) except GPGProblem as e: - raise ValidateError(e.message) + raise ValidateError(str(e)) |