mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🎨 在 return_code
未找到情况下返回解析的数据
This commit is contained in:
parent
1c33189752
commit
cd28ef9120
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user