mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix keyerror
This commit is contained in:
parent
630c9391ee
commit
5a1c75f8e4
1 changed files with 2 additions and 4 deletions
|
@ -400,10 +400,8 @@ class OtherCog(commands.Cog):
|
|||
return_when=asyncio.FIRST_COMPLETED,
|
||||
)
|
||||
done_tasks = done
|
||||
done = done_tasks or pending
|
||||
done = pending or done_tasks
|
||||
try:
|
||||
done = done.pop()
|
||||
done = done_tasks.pop()
|
||||
except KeyError:
|
||||
return await ctx.respond(
|
||||
"Something went wrong. Try again?\n"
|
||||
|
@ -418,7 +416,7 @@ class OtherCog(commands.Cog):
|
|||
|
||||
await asyncio.sleep(1)
|
||||
await ctx.edit(content=f"Preparing to screenshot {friendly_url}... (16%)")
|
||||
okay = await pending.pop()
|
||||
okay = await (pending or done_tasks).pop()
|
||||
if okay is not True:
|
||||
return await ctx.edit(
|
||||
content="That domain is blacklisted, doesn't exist, or there was no answer from the DNS server."
|
||||
|
|
Loading…
Reference in a new issue