Fix DB issues with Python 3.12
All checks were successful
Build and push Docker images on git tags / build (push) Successful in 40m1s

This commit is contained in:
Magnus Bender 2024-11-20 12:03:38 +01:00
parent cc4bb9a7e8
commit aae167cf11
Signed by: bender
GPG Key ID: 5149A211831F2BD7
2 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
name: Build and push Docker image at git tag name: Build and push Docker images on git tags
on: on:
push: push:
tags: tags:

View File

@ -26,7 +26,8 @@ class DB():
def __init__(self): def __init__(self):
self.db = sqlite3.connect( self.db = sqlite3.connect(
os.path.join(PERSIST_PATH, 'messages.db'), os.path.join(PERSIST_PATH, 'messages.db'),
check_same_thread=False check_same_thread=False,
autocommit=False
) )
self.db.row_factory = sqlite3.Row self.db.row_factory = sqlite3.Row
atexit.register(lambda db : db.close(), self.db) atexit.register(lambda db : db.close(), self.db)
@ -192,5 +193,3 @@ class DB():
) )
except: except:
return None return None