handle NONE type in http response (#3795)

This commit is contained in:
LawyZheng
2025-10-23 12:28:10 +08:00
committed by GitHub
parent 7a129c2219
commit b15d4fc290
3 changed files with 6 additions and 1 deletions

View File

@@ -137,7 +137,7 @@ async def aiohttp_post(
timeout: int = DEFAULT_REQUEST_TIMEOUT,
raise_exception: bool = True,
retry_timeout: float = 0,
) -> dict[str, Any]:
) -> dict[str, Any] | None:
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=timeout)) as session:
count = 0
while count <= retry: