From f15bd985af8c04fdef38eb2c9ab84174b7a1a205 Mon Sep 17 00:00:00 2001 From: snowy Date: Wed, 27 Mar 2024 08:03:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BF=BD=E7=95=A5=E9=94=AE=E7=9B=98?= =?UTF-8?q?=E4=B8=AD=E6=96=AD=E7=B1=BB=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 04420c92..8933281b 100644 --- a/main.py +++ b/main.py @@ -19,5 +19,7 @@ if __name__ == "__main__": try: nonebot.run() except BaseException as e: - nonebot.logger.error(f"An error occurred: {e}, Bug will be reported automatically.") - liteyuki_api.bug_report(str(e.__repr__())) + # 排除键盘中断 + if not isinstance(e, KeyboardInterrupt): + nonebot.logger.error(f"An error occurred: {e}, Bug will be reported automatically.") + liteyuki_api.bug_report(str(e.__repr__()))