From cd28ef91201b87d0fea5bc62493930a8df313b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Sat, 8 Oct 2022 09:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E5=9C=A8=20`return=5Fcode`=20?= =?UTF-8?q?=E6=9C=AA=E6=89=BE=E5=88=B0=E6=83=85=E5=86=B5=E4=B8=8B=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E8=A7=A3=E6=9E=90=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/apihelper/request/hoyorequest.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/apihelper/request/hoyorequest.py b/modules/apihelper/request/hoyorequest.py index fc1587a..17125f1 100644 --- a/modules/apihelper/request/hoyorequest.py +++ b/modules/apihelper/request/hoyorequest.py @@ -2,7 +2,7 @@ from typing import Union import httpx -from modules.apihelper.error import NetworkException, ResponseException, DataNotFoundError, TimedOut +from modules.apihelper.error import NetworkException, ResponseException, TimedOut from modules.apihelper.request.httpxrequest import HTTPXRequest from modules.apihelper.typedefs import POST_DATA, JSON_DATA @@ -26,8 +26,6 @@ class HOYORequest(HTTPXRequest): data = json_data.get("data", None) message = json_data.get("message", None) if return_code is None: - if data is None: - raise DataNotFoundError return json_data if return_code != 0: if message is None: