Add exception handling for unused session keys

This commit is contained in:
thecosmos
2020-01-18 16:14:38 +05:30
parent bec89bbeda
commit 443e36453e
2 changed files with 5 additions and 2 deletions

View File

@@ -62,7 +62,10 @@ class DiscordOAuth2Session(_http.DiscordOAuth2HttpClient):
"""
for session_key in self.SESSION_KEYS:
session.pop(session_key)
try:
session.pop(session_key)
except KeyError:
pass
@property
def authorized(self):