We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83b0c6f commit 0d0ab8eCopy full SHA for 0d0ab8e
python/knot_resolver/manager/__main__.py
@@ -1,4 +1,5 @@
1
from knot_resolver.manager.main import main
2
+from knot_resolver.utils.compat import asyncio
3
4
if __name__ == "__main__":
- main()
5
+ asyncio.run(main())
python/knot_resolver/manager/main.py
@@ -35,7 +35,7 @@ def parse_args() -> argparse.Namespace:
35
return parser.parse_args()
36
37
38
-def main() -> NoReturn:
+async def main() -> NoReturn:
39
# initial logging is to memory until we read the config
40
logger_startup()
41
@@ -48,5 +48,5 @@ def main() -> NoReturn:
48
else:
49
config_path = CONFIG_FILE
50
51
- exit_code = compat.asyncio.run(start_server(config=config_path))
+ exit_code = await start_server(config=config_path)
52
sys.exit(exit_code)
0 commit comments