diff options
| author | Hornwitser <[email protected]> | 2018-08-01 11:36:46 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-11-24 22:17:57 -0500 |
| commit | 4ae8e816603ce8df6242dcd85174514972067448 (patch) | |
| tree | 808d389939169ffee69afcabbe932c09a307207c /discord/voice_client.py | |
| parent | [lint] Limit unneccessarily broad except clauses (diff) | |
| download | discord.py-4ae8e816603ce8df6242dcd85174514972067448.tar.xz discord.py-4ae8e816603ce8df6242dcd85174514972067448.zip | |
[lint] Remove redundant exception variables
Use bare raise statement when reraising the exception that occured, and
remove unused exception variables. Also remove a pointless exception
handler in discord.opus.
Diffstat (limited to 'discord/voice_client.py')
| -rw-r--r-- | discord/voice_client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py index b519b981..9d189af2 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -142,9 +142,9 @@ class VoiceClient: try: await asyncio.wait_for(self._handshake_complete.wait(), timeout=self.timeout, loop=self.loop) - except asyncio.TimeoutError as e: + except asyncio.TimeoutError: await self.terminate_handshake(remove=True) - raise e + raise log.info('Voice handshake complete. Endpoint found %s (IP: %s)', self.endpoint, self.endpoint_ip) @@ -232,7 +232,7 @@ class VoiceClient: if not reconnect: await self.disconnect() - raise e + raise retry = backoff.delay() log.exception('Disconnected from voice... Reconnecting in %.2fs.', retry) |