From 6a1b51e2b489d0cf64b390f49c450c88821df4d9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 27 Dec 2023 18:07:46 +0100 Subject: [PATCH] Implement entrypoint run function Because otheriwse we run into AttributeError: module 'wyoming_satellite.__main__' has no attribute 'run' --- wyoming_satellite/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wyoming_satellite/__main__.py b/wyoming_satellite/__main__.py index 582b186..b96665d 100644 --- a/wyoming_satellite/__main__.py +++ b/wyoming_satellite/__main__.py @@ -439,8 +439,12 @@ def _split(command: Optional[str]) -> Optional[List[str]]: # ----------------------------------------------------------------------------- -if __name__ == "__main__": +def run(): try: asyncio.run(main()) except KeyboardInterrupt: pass + + +if __name__ == "__main__": + run()