Skip to content

Commit

Permalink
suppress a uvloop specific not implemented error (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding authored Oct 3, 2020
1 parent 5429e11 commit cbb7466
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hikari/impl/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import asyncio
import concurrent.futures
import contextlib
import datetime
import logging
import math
Expand Down Expand Up @@ -994,6 +995,9 @@ async def murder(future: asyncio.Future[typing.Any]) -> None:
if sys.version_info >= (3, 9):
_LOGGER.debug("shutting down default executor")
loop.run_until_complete(loop.shutdown_default_executor())
with contextlib.suppress(NotImplementedError):
# This seems to raise a NotImplementedError when running with uvloop.
loop.run_until_complete(loop.shutdown_default_executor())

_LOGGER.debug("shutting down asyncgens")
loop.run_until_complete(loop.shutdown_asyncgens())
Expand Down

0 comments on commit cbb7466

Please sign in to comment.