forked from orbit-oss/flask
automated change using python-modernize: use 'as' in except
This commit is contained in:
parent
521398d5e7
commit
6caaa8a527
12 changed files with 32 additions and 32 deletions
|
|
@ -127,7 +127,7 @@ class Config(dict):
|
|||
d.__file__ = filename
|
||||
try:
|
||||
execfile(filename, d.__dict__)
|
||||
except IOError, e:
|
||||
except IOError as e:
|
||||
if silent and e.errno in (errno.ENOENT, errno.EISDIR):
|
||||
return False
|
||||
e.strerror = 'Unable to load configuration file (%s)' % e.strerror
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue