modified: __pycache__/main.cpython-312.pyc

modified:   main.py
This commit is contained in:
2026-05-15 09:31:40 +08:00
parent 0a30b46847
commit 4034250b01
2 changed files with 13 additions and 0 deletions
Binary file not shown.
+13
View File
@@ -126,7 +126,20 @@ class MyPlugin(Star):
self.sqllitaa.commit()
cur.close()
self.sqllitaa.close()
# 删除源文件
file_list = os.listdir(f"{self.data_path}")
for nam in file_list:
if "zhangdan.db" not in nam:
try:
os.remove(str(self.data_path)+"\\"+nam)
except IOError as e:
file_listaa = os.listdir(f"{self.data_path}/zhangdan/")
for namaa in file_listaa:
os.remove(str(self.data_path)+"\\zhangdan\\"+namaa)
# logger.info(f"{e}")
yield event.plain_result("保存完成__使用/chazhang 查询最后10条记录")
except Exception as e:
yield event.plain_result(f"保存失败{e}")
logger.info(f"{e}")