From 1e278de4cc9a4181e0747640a960e80efcea1ca9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 6 Jan 2019 01:19:47 -0500 Subject: Post black reformatting Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe --- lib/sqlalchemy/testing/provision.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'lib/sqlalchemy/testing/provision.py') diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py index 25028ccb3..88dc28528 100644 --- a/lib/sqlalchemy/testing/provision.py +++ b/lib/sqlalchemy/testing/provision.py @@ -1,13 +1,16 @@ -from sqlalchemy.engine import url as sa_url -from sqlalchemy import create_engine -from sqlalchemy import text -from sqlalchemy import exc -from sqlalchemy.util import compat -from . import config, engines import collections +import logging import os import time -import logging + +from . import config +from . import engines +from .. import create_engine +from .. import exc +from .. import text +from ..engine import url as sa_url +from ..util import compat + log = logging.getLogger(__name__) @@ -190,6 +193,8 @@ def _pg_create_db(cfg, eng, ident): template_db, ) time.sleep(0.5) + except: + raise else: break @@ -395,7 +400,8 @@ def _mssql_drop_ignore(conn, ident): try: # typically when this happens, we can't KILL the session anyway, # so let the cleanup process drop the DBs - # for row in conn.execute("select session_id from sys.dm_exec_sessions " + # for row in conn.execute( + # "select session_id from sys.dm_exec_sessions " # "where database_id=db_id('%s')" % ident): # log.info("killing SQL server sesssion %s", row['session_id']) # conn.execute("kill %s" % row['session_id']) -- cgit v1.2.1