Skip to content

Commit ba7ecab

Browse files
committed
cli: use asyncio.run
Since we require Python 3.8, we can use this. It does a better job cleaning up (especially needed for Bleak on Linux).
1 parent 29b1bee commit ba7ecab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pybricksdev/cli/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,4 @@ def main():
322322
if not args.tool:
323323
parser.error(f'Missing name of tool: {"|".join(subparsers.choices.keys())}')
324324

325-
loop = asyncio.get_event_loop()
326-
loop.run_until_complete(subparsers.choices[args.tool].tool.run(args))
325+
asyncio.run(subparsers.choices[args.tool].tool.run(args))

0 commit comments

Comments
 (0)