From f6b5e9aec639fe279c5c5ab70f5c4e534ddc3b45 Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Sat, 18 Jun 2022 00:22:37 +0800 Subject: =?UTF-8?q?=F0=9F=92=A9=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/code_runner/data_source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ATRI/plugins/code_runner') diff --git a/ATRI/plugins/code_runner/data_source.py b/ATRI/plugins/code_runner/data_source.py index 87ae792..d5df230 100644 --- a/ATRI/plugins/code_runner/data_source.py +++ b/ATRI/plugins/code_runner/data_source.py @@ -64,7 +64,7 @@ class CodeRunner(Service): try: _ = args[1] - except: + except Exception: return "请检查键入内容...需要帮助:/code help" lang = args[0].replace("\r", "") @@ -90,7 +90,7 @@ class CodeRunner(Service): try: res = await request.post(url, json=js) - except RequestError: + except Exception: raise RequestError("Request failed!") payload = res.json() -- cgit v1.2.3