Minor code simplification
This commit is contained in:
1 parent
cc7c4c1ab9
commit
d68271068d
1 file changed
+2
-3
@@ -385,14 +385,13 @@ class _AuthState:
|
||||
"https://id.twitch.tv/oauth2/validate",
|
||||
headers={"Authorization": f"OAuth {self.access_token}"}
|
||||
) as response:
|
||||
status = response.status
|
||||
if status == 401:
|
||||
if response.status == 401:
|
||||
# the access token we have is invalid - clear the cookie and reauth
|
||||
logger.info("Restored session is invalid")
|
||||
assert client_info.CLIENT_URL.host is not None
|
||||
jar.clear_domain(client_info.CLIENT_URL.host)
|
||||
continue
|
||||
elif status == 200:
|
||||
elif response.status == 200:
|
||||
validate_response = await response.json()
|
||||
break
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user