From 84c79143dcf0a56112d8703f24052ca1f5f2832c Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Thu, 14 Jul 2016 14:31:24 +0200 Subject: Fix except syntax --- alot/settings/checks.py | 4 ++-- alot/settings/utils.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'alot/settings') 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..' -- cgit v1.2.3