diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2016-07-14 14:31:24 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2016-12-09 11:26:19 +0100 |
commit | 84c79143dcf0a56112d8703f24052ca1f5f2832c (patch) | |
tree | e824421a44e77464f262f344bc0f4b87d610ea0c /alot/settings | |
parent | fe748a7f47fb61d46dd88c270c2329e6ff19a895 (diff) |
Fix except syntax
Diffstat (limited to 'alot/settings')
-rw-r--r-- | alot/settings/checks.py | 4 | ||||
-rw-r--r-- | alot/settings/utils.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/alot/settings/checks.py b/alot/settings/checks.py index fd44fe66..cf7b370e 100644 --- a/alot/settings/checks.py +++ b/alot/settings/checks.py @@ -43,7 +43,7 @@ def attr_triple(value): mono = AttrSpec(acc['1fg'], acc['1bg'], 1) normal = AttrSpec(acc['16fg'], acc['16bg'], 16) high = AttrSpec(acc['256fg'], acc['256bg'], 256) - except AttrSpecError, e: + except AttrSpecError as e: raise ValidateError(e.message) return mono, normal, high @@ -142,5 +142,5 @@ def gpg_key(value): """ try: return crypto.get_key(value) - except GPGProblem, e: + except GPGProblem as e: raise ValidateError(e.message) diff --git a/alot/settings/utils.py b/alot/settings/utils.py index f46a8caf..2048a36c 100644 --- a/alot/settings/utils.py +++ b/alot/settings/utils.py @@ -27,7 +27,8 @@ def read_config(configpath=None, specpath=None, checks={}): except ConfigObjError as e: raise ConfigError(e) except IOError: - raise ConfigError('Could not read %s and/or %s' % (configpath, specpath)) + raise ConfigError('Could not read %s and/or %s' + % (configpath, specpath)) except UnboundLocalError: # this works around a bug in configobj msg = '%s is malformed. Check for sections without parents..' |