diff options
| author | Rapptz <[email protected]> | 2019-11-20 03:04:04 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-11-20 03:04:04 -0500 |
| commit | 4ef0fb0d959b69d3b2cea87b0fc08310028e348f (patch) | |
| tree | 551edac62a819e4a1afe9cb19202df43cd9505b3 /discord/utils.py | |
| parent | Fix one more remaining loop passing for 3.8 in a Lock (diff) | |
| download | discord.py-4ef0fb0d959b69d3b2cea87b0fc08310028e348f.tar.xz discord.py-4ef0fb0d959b69d3b2cea87b0fc08310028e348f.zip | |
Fix more deprecation warnings
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/utils.py b/discord/utils.py index 2b4f0fda..bc281502 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -328,7 +328,10 @@ async def async_all(gen, *, check=_isawaitable): return True async def sane_wait_for(futures, *, timeout): - done, pending = await asyncio.wait(futures, timeout=timeout, return_when=asyncio.ALL_COMPLETED) + ensured = [ + asyncio.ensure_future(fut) for fut in futures + ] + done, pending = await asyncio.wait(ensured, timeout=timeout, return_when=asyncio.ALL_COMPLETED) if len(pending) != 0: raise asyncio.TimeoutError() |