From 8bb8a72060fd3dbc8d0f7cc4ca358fabf1170931 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Thu, 5 Jan 2023 21:01:37 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/utils/updater.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/utils/updater.py b/pkg/utils/updater.py index caf59ee..79c5bd6 100644 --- a/pkg/utils/updater.py +++ b/pkg/utils/updater.py @@ -25,7 +25,8 @@ def update_all(): dt = datetime.datetime.fromtimestamp(entry.commit.commit_time, tz) change_log += dt.strftime('%Y-%m-%d %H:%M:%S') + " [" + str(entry.commit.message, encoding="utf-8").strip()+"]\n" - pkg.utils.context.get_qqbot_manager().notify_admin("更新完成,更新内容如下:\n"+change_log) + if change_log != "": + pkg.utils.context.get_qqbot_manager().notify_admin("代码拉取完成,更新内容如下:\n"+change_log) except ModuleNotFoundError: raise Exception("dulwich模块未安装,请查看 https://github.com/RockChinQ/QChatGPT/issues/77") except dulwich.porcelain.DivergedBranches: