mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 13:36:35 +00:00
Use db.connection.ensure_connection()
This commit is contained in:
parent
1142fb6844
commit
be1617979f
@ -24,6 +24,7 @@ def SQLTable(arg_table):
|
|||||||
needle = arg_table
|
needle = arg_table
|
||||||
if needle.startswith('new__'):
|
if needle.startswith('new__'):
|
||||||
needle = arg_table[len('new__'):]
|
needle = arg_table[len('new__'):]
|
||||||
|
db.connection.ensure_connection()
|
||||||
valid_table_name = (
|
valid_table_name = (
|
||||||
needle in new_tables and
|
needle in new_tables and
|
||||||
arg_table in db_tables(include_views=False)
|
arg_table in db_tables(include_views=False)
|
||||||
@ -122,6 +123,7 @@ class Command(BaseCommand):
|
|||||||
+ f': {db.connection.vendor}'
|
+ f': {db.connection.vendor}'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
db.connection.ensure_connection()
|
||||||
db_is_mariadb = (
|
db_is_mariadb = (
|
||||||
hasattr(db.connection, 'mysql_is_mariadb') and
|
hasattr(db.connection, 'mysql_is_mariadb') and
|
||||||
db.connection.is_usable() and
|
db.connection.is_usable() and
|
||||||
|
Loading…
Reference in New Issue
Block a user