From 0dc77813257de123b720ad51d6cb29b76c973ba3 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Mon, 2 Jan 2023 13:37:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20updater=E4=B8=AD=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84dulwich=E9=A2=84=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/utils/updater.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/utils/updater.py b/pkg/utils/updater.py index 90b14004..945f615c 100644 --- a/pkg/utils/updater.py +++ b/pkg/utils/updater.py @@ -1,8 +1,10 @@ -import dulwich.porcelain - def update_all(): """使用dulwich更新源码""" + try: + import dulwich + except ModuleNotFoundError: + raise Exception("dulwich模块未安装,请查看 https://github.com/RockChinQ/QChatGPT/issues/77") try: from dulwich import porcelain repo = porcelain.open_repo('.')