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

@@ -11,4 +11,4 @@ __all__ = [
] ]
__version__ = "0.1.05" __version__ = "0.1.06"

View File

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