1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-30 20:48:12 +00:00
This commit is contained in:
VarMonke 2022-05-02 00:48:54 +05:30
commit 456d2f9916

View file

@ -102,8 +102,11 @@ class GHClient:
return self
async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
if session := getattr(self.http, 'session', None):
try:
session = self.http.session
await session.close()
except Exception as exc:
raise Exception('HTTP Session doesn\'t exist') from exc
def __repr__(self) -> str:
return f'<{self.__class__.__name__} has_auth={bool(self._auth)}>'