Disable same thread check for database

This commit is contained in:
sqozz 2022-07-13 09:10:05 +02:00
parent 463f2f3a8b
commit 858ba7bc2c

View file

@ -2,7 +2,7 @@ import sqlite3, time
class History(): class History():
def __init__(self): def __init__(self):
self.__db = sqlite3.connect('history.sqlite') self.__db = sqlite3.connect('history.sqlite', check_same_thread=False)
self.__c = self.__db.cursor() self.__c = self.__db.cursor()
self.__c.execute(""" self.__c.execute("""
CREATE TABLE IF NOT EXISTS numbers ( CREATE TABLE IF NOT EXISTS numbers (