aboutsummaryrefslogtreecommitdiff
path: root/discord/voice_client.py
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-08-01 11:41:15 +0200
committerRapptz <[email protected]>2018-11-24 22:17:57 -0500
commitfa46b07db15f5ce41be3f4944d2ff011794207d5 (patch)
tree0a87a0731c797cfadb69f7812ee4813628b4eba2 /discord/voice_client.py
parent[lint] Remove redundant exception variables (diff)
downloaddiscord.py-fa46b07db15f5ce41be3f4944d2ff011794207d5.tar.xz
discord.py-fa46b07db15f5ce41be3f4944d2ff011794207d5.zip
[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.
Diffstat (limited to 'discord/voice_client.py')
-rw-r--r--discord/voice_client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index 9d189af2..14c54493 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -224,9 +224,9 @@ class VoiceClient:
while True:
try:
await self.ws.poll_event()
- except (ConnectionClosed, asyncio.TimeoutError) as e:
- if isinstance(e, ConnectionClosed):
- if e.code == 1000:
+ except (ConnectionClosed, asyncio.TimeoutError) as exc:
+ if isinstance(exc, ConnectionClosed):
+ if exc.code == 1000:
await self.disconnect()
break