just reconnect regardless of whatever before an execution

This commit is contained in:
Philipp 2022-10-07 20:03:11 +02:00
parent 4fc4b6a018
commit b2c9c95821
Signed by: Spaenny
GPG Key ID: 9EBD8439AFBAB750
1 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@ class Database:
)
def init_test_database(self):
self.con.reconnect()
cursor = self.con.cursor()
try:
cursor.execute("CREATE TABLE discord_link ( admin_id int(10) UNSIGNED NOT NULL, discord_id bigint(20) UNSIGNED NOT NULL, steamid varchar(65) COLLATE utf8mb4_unicode_ci NOT NULL);")
@ -29,6 +30,7 @@ class Database:
raise Exception("Error while trying to connect to database.")
def create_reserved_slot(self, discord_user, steam_id):
self.con.reconnect()
cursor = self.con.cursor()
try: