Skip to content

Commit

Permalink
use asyncio.run
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Jun 26, 2024
1 parent cb28dcd commit 08386c8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions chargeamps/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,7 @@ async def main_loop() -> None:


def main() -> None:
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(main_loop())
finally:
loop.close()
asyncio.run(main_loop())


if __name__ == "__main__":
Expand Down

0 comments on commit 08386c8

Please sign in to comment.