mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
[lint] Remove unused variables
Left over from various refactoring and rewrites.
This commit is contained in:
@ -74,7 +74,7 @@ class Shard:
|
||||
async def poll(self):
|
||||
try:
|
||||
await self.ws.poll_event()
|
||||
except ResumeWebSocket as e:
|
||||
except ResumeWebSocket:
|
||||
log.info('Got a request to RESUME the websocket at Shard ID %s.', self.id)
|
||||
coro = DiscordWebSocket.from_client(self._client, resume=True,
|
||||
shard_id=self.id,
|
||||
@ -212,7 +212,7 @@ class AutoShardedClient(Client):
|
||||
try:
|
||||
coro = websockets.connect(gateway, loop=self.loop, klass=DiscordWebSocket, compression=None)
|
||||
ws = await asyncio.wait_for(coro, loop=self.loop, timeout=180.0)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
log.info('Failed to connect for shard_id: %s. Retrying...', shard_id)
|
||||
await asyncio.sleep(5.0, loop=self.loop)
|
||||
return (await self.launch_shard(gateway, shard_id))
|
||||
@ -265,7 +265,7 @@ class AutoShardedClient(Client):
|
||||
|
||||
while True:
|
||||
pollers = [shard.get_future() for shard in self.shards.values()]
|
||||
done, pending = await asyncio.wait(pollers, loop=self.loop, return_when=asyncio.FIRST_COMPLETED)
|
||||
done, _ = await asyncio.wait(pollers, loop=self.loop, return_when=asyncio.FIRST_COMPLETED)
|
||||
for f in done:
|
||||
# we wanna re-raise to the main Client.connect handler if applicable
|
||||
f.result()
|
||||
|
Reference in New Issue
Block a user