From dee41bb04906d6976b4f7c05c222f7d95182b3ea Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 16 Aug 2017 11:37:31 -0700 Subject: 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. --- alot/utils/configobj.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alot/utils') 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)) -- cgit v1.2.3