From 9b5f48c91511db916935a1b61cb06750c69fbbcb Mon Sep 17 00:00:00 2001 From: helloplhm-qwq Date: Sun, 17 Dec 2023 13:37:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=81=9C=E6=AD=A2=E6=97=B6=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4c84742..6a6a492 100644 --- a/main.py +++ b/main.py @@ -145,5 +145,11 @@ async def initMain(): logger.info("Server stopped") if __name__ == "__main__": - start_checkcn_thread() - asyncio.run(initMain()) \ No newline at end of file + try: + start_checkcn_thread() + asyncio.run(initMain()) + except KeyboardInterrupt: + pass + except: + logger.error('初始化出错,请检查日志') + logger.error(traceback.format_exc()) \ No newline at end of file