[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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user