Fix DB issues with Python 3.12
All checks were successful
Build and push Docker images on git tags / build (push) Successful in 40m1s
All checks were successful
Build and push Docker images on git tags / build (push) Successful in 40m1s
This commit is contained in:
parent
cc4bb9a7e8
commit
aae167cf11
@ -1,4 +1,4 @@
|
||||
name: Build and push Docker image at git tag
|
||||
name: Build and push Docker images on git tags
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
|
@ -26,7 +26,8 @@ class DB():
|
||||
def __init__(self):
|
||||
self.db = sqlite3.connect(
|
||||
os.path.join(PERSIST_PATH, 'messages.db'),
|
||||
check_same_thread=False
|
||||
check_same_thread=False,
|
||||
autocommit=False
|
||||
)
|
||||
self.db.row_factory = sqlite3.Row
|
||||
atexit.register(lambda db : db.close(), self.db)
|
||||
@ -191,6 +192,4 @@ class DB():
|
||||
self.db.execute("SELECT * FROM Messages WHERE count = ?", (count,)).fetchone()
|
||||
)
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
return None
|
Loading…
x
Reference in New Issue
Block a user