From: Mike Bayer Date: Sat, 19 Aug 2017 22:06:02 +0000 (-0400) Subject: - do ten attempts to create database X-Git-Tag: origin~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0b58403205b68b5719d7c27ffb4ccc436c7e840;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - do ten attempts to create database Change-Id: I14a5dd920d14096aa4401cb8b9d71f47d3915879 --- diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py index 9fb9eae8d4..546def22ed 100644 --- a/lib/sqlalchemy/testing/provision.py +++ b/lib/sqlalchemy/testing/provision.py @@ -168,7 +168,7 @@ def _pg_create_db(cfg, eng, ident): conn.execute( "CREATE DATABASE %s TEMPLATE %s" % (ident, currentdb)) except exc.OperationalError as err: - if attempt != 2 and "accessed by other users" in str(err): + if attempt != 10 and "accessed by other users" in str(err): time.sleep(.2) continue else: