From fa46b07db15f5ce41be3f4944d2ff011794207d5 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 1 Aug 2018 11:41:15 +0200 Subject: [lint] Rename exception variables to exc Use the more explicit (and common) exc instead of e as the variable holding the exception in except handlers. --- discord/http.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'discord/http.py') diff --git a/discord/http.py b/discord/http.py index 93e9708d..7fc6abda 100644 --- a/discord/http.py +++ b/discord/http.py @@ -244,10 +244,10 @@ class HTTPClient: try: data = await self.request(Route('GET', '/users/@me')) - except HTTPException as e: + except HTTPException as exc: self._token(old_token, bot=old_bot) - if e.response.status == 401: - raise LoginFailure('Improper token has been passed.') from e + if exc.response.status == 401: + raise LoginFailure('Improper token has been passed.') from exc raise return data @@ -742,8 +742,8 @@ class HTTPClient: async def get_gateway(self, *, encoding='json', v=6, zlib=True): try: data = await self.request(Route('GET', '/gateway')) - except HTTPException as e: - raise GatewayNotFound() from e + except HTTPException as exc: + raise GatewayNotFound() from exc if zlib: value = '{0}?encoding={1}&v={2}&compress=zlib-stream' else: @@ -753,8 +753,8 @@ class HTTPClient: async def get_bot_gateway(self, *, encoding='json', v=6, zlib=True): try: data = await self.request(Route('GET', '/gateway/bot')) - except HTTPException as e: - raise GatewayNotFound() from e + except HTTPException as exc: + raise GatewayNotFound() from exc if zlib: value = '{0}?encoding={1}&v={2}&compress=zlib-stream' -- cgit v1.2.3