修复db文件空格路径的bug

This commit is contained in:
shuaikangzhou
2023-11-15 23:53:39 +08:00
parent 5849b8f692
commit 3ceb9e2340
7 changed files with 125 additions and 43 deletions

11
app/DataBase/msg.py Normal file
View File

@@ -0,0 +1,11 @@
import os.path
import sqlite3
DB = None
cursor = None
misc_path = "./app/Database/Msg/MSG0.db"
# misc_path = './Msg/Misc.db'
if os.path.exists(misc_path):
DB = sqlite3.connect(misc_path, check_same_thread=False)
# '''创建游标'''
cursor = DB.cursor()