From eaae8ceaad6f876120ae14fe90664977bf7b61c4 Mon Sep 17 00:00:00 2001 From: snowy Date: Wed, 3 Apr 2024 14:59:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BD=E4=BA=A7=E6=9F=90=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=BD=AF=E4=BB=B6=E7=9A=84=E5=9B=BE=E5=BA=8A=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- liteyuki/liteyuki_main/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liteyuki/liteyuki_main/core.py b/liteyuki/liteyuki_main/core.py index eab375b..2c6b4e5 100644 --- a/liteyuki/liteyuki_main/core.py +++ b/liteyuki/liteyuki_main/core.py @@ -1,6 +1,7 @@ import base64 from typing import Any +import nonebot import pip from git import Repo from nonebot import Bot, require, get_driver @@ -104,8 +105,7 @@ async def _(bot: T_Bot, event: T_MessageEvent): repo.remotes[origin].pull() break except Exception as e: - print(f"Pull from {origin} failed: {e}") - logs = repo.index + nonebot.logger.error(f"Pull from {origin} failed: {e}") reply = "Liteyuki updated!\n" reply += f"```\n{logs}\n```\n" btn_restart = md.button(ulang.get("liteyuki.restart_now"), "reload-liteyuki")