Add missing 'connect' wrapper

This was missed in change Ib789cd4d11a3d5dd01fcdb99822025b11bbc234e
("Don't rely on implicit autocommit")

Change-Id: I9ec27650ae5e36099a6d2b2d59bb66cd820e8ffc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2021-08-16 15:37:34 +01:00
parent 6ecce89961
commit 4314279250

View File

@ -1162,6 +1162,8 @@ def get_non_ndbcluster_tables(connectable, skip_tables=None):
params['database'] = connectable.engine.url.database
query = text(query_str)
# TODO(stephenfin): What about if this is already a Connection?
with connectable.connect() as conn, conn.begin():
nonndbcluster = connectable.execute(query, **params)
return [i[0] for i in nonndbcluster]