Skip to content

Commit

Permalink
Dev: prun: replace deprecated stdlib API asyncio.get_event_loop()
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Jul 12, 2024
1 parent c297169 commit 2465ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crmsh/prun/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def run(self, timeout_seconds: int = -1):
)
if timeout_seconds > 0:
awaitable = self._timeout_limit(timeout_seconds, awaitable)
return asyncio.get_event_loop().run_until_complete(awaitable)
return asyncio.get_event_loop_policy().get_event_loop().run_until_complete(awaitable)

async def _timeout_limit(self, timeout_seconds: int, awaitable: typing.Awaitable):
assert timeout_seconds > 0
Expand Down

0 comments on commit 2465ff3

Please sign in to comment.