mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 12:56:02 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e89035e11c | ||
|
|
2ea711e629 |
@@ -4,6 +4,7 @@ import json
|
|||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import threading
|
import threading
|
||||||
|
import traceback
|
||||||
|
|
||||||
import pkg.openai.session
|
import pkg.openai.session
|
||||||
import pkg.openai.manager
|
import pkg.openai.manager
|
||||||
@@ -362,6 +363,7 @@ def process_command(session_name: str, text_message: str, mgr, config,
|
|||||||
else:
|
else:
|
||||||
pkg.utils.context.get_qqbot_manager().notify_admin("无新版本")
|
pkg.utils.context.get_qqbot_manager().notify_admin("无新版本")
|
||||||
except Exception as e0:
|
except Exception as e0:
|
||||||
|
traceback.print_exc()
|
||||||
pkg.utils.context.get_qqbot_manager().notify_admin("更新失败:{}".format(e0))
|
pkg.utils.context.get_qqbot_manager().notify_admin("更新失败:{}".format(e0))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -126,6 +126,15 @@ def update_all(cli: bool = False) -> bool:
|
|||||||
dst = src.replace(source_root, ".")
|
dst = src.replace(source_root, ".")
|
||||||
if os.path.exists(dst):
|
if os.path.exists(dst):
|
||||||
os.remove(dst)
|
os.remove(dst)
|
||||||
|
|
||||||
|
# 检查目标文件夹是否存在
|
||||||
|
if not os.path.exists(os.path.dirname(dst)):
|
||||||
|
os.makedirs(os.path.dirname(dst))
|
||||||
|
# 检查目标文件是否存在
|
||||||
|
if not os.path.exists(dst):
|
||||||
|
# 创建目标文件
|
||||||
|
open(dst, "w").close()
|
||||||
|
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
|
|
||||||
# 把current_tag写入文件
|
# 把current_tag写入文件
|
||||||
|
|||||||
Reference in New Issue
Block a user