Skip to content

Commit

Permalink
Fix None returned from fetch_cookie_token_info
Browse files Browse the repository at this point in the history
  • Loading branch information
thesadru authored Nov 16, 2022
1 parent c09e5ec commit 48daeef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion genshin/client/manager/cookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def fetch_cookie_token_info(
data = await r.json()

data = data["data"]
if data["status"] != 1:
if data["status"] != 1 or not data or not data["cookie_info"]:
raise errors.CookieException(msg=f"Error fetching cookie token info {data['status']}")

return data["cookie_info"]
Expand Down

0 comments on commit 48daeef

Please sign in to comment.