aboutsummaryrefslogtreecommitdiff
path: root/discord/shard.py
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-06-22 14:47:56 +0200
committerRapptz <[email protected]>2018-08-22 21:43:51 -0400
commit119c5a0618c82b7f425a59e2e6a8c5ce35c48a37 (patch)
tree5dcb485ece928adbc2886c0eebd5fcde7be8093b /discord/shard.py
parent[lint] Remove unused imports (diff)
downloaddiscord.py-119c5a0618c82b7f425a59e2e6a8c5ce35c48a37.tar.xz
discord.py-119c5a0618c82b7f425a59e2e6a8c5ce35c48a37.zip
[lint] Remove unused variables
Left over from various refactoring and rewrites.
Diffstat (limited to 'discord/shard.py')
-rw-r--r--discord/shard.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/shard.py b/discord/shard.py
index 8e04b9c5..c06e6398 100644
--- a/discord/shard.py
+++ b/discord/shard.py
@@ -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()