[#8530] convert exception handlers to except..as syntax

Futurize fixers:
* lib2to3.fixes.fix_except
This commit is contained in:
Xavier Morel
2017-04-11 14:53:29 +02:00
parent ca74b5e1c8
commit 3979f6802e
53 changed files with 209 additions and 121 deletions
+1 -1
View File
@@ -95,5 +95,5 @@ class Deploy(Command):
args.url = 'https://%s' % args.url
result = self.deploy_module(args.path, args.url, args.login, args.password, args.db, force=args.force)
print(result)
except Exception, e:
except Exception as e:
sys.exit("ERROR: %s" % e)
+2 -2
View File
@@ -56,9 +56,9 @@ class Start(Command):
# TODO: forbid some database names ? eg template1, ...
try:
_create_empty_database(args.db_name)
except DatabaseExists, e:
except DatabaseExists as e:
pass
except Exception, e:
except Exception as e:
die("Could not create database `%s`. (%s)" % (args.db_name, e))
if '--db-filter' not in cmdargs: