summaryrefslogtreecommitdiff
path: root/swiftstory/__main__.py
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2025-08-18 11:59:15 +0200
committerOlivier Gayot <olivier.gayot@sigexec.com>2025-08-18 12:16:15 +0200
commit7b6d125493ccda5bf37f394d50fbd141202294d4 (patch)
tree006e96b210c1f53c8a3d69972c9ccaf772bfceee /swiftstory/__main__.py
parent6881f41f8e10bf6f7fd806454f8b8359b9f3d325 (diff)
Release swiftstory 0.4HEADmaster
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'swiftstory/__main__.py')
-rw-r--r--swiftstory/__main__.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/swiftstory/__main__.py b/swiftstory/__main__.py
index 453f25f..acaa683 100644
--- a/swiftstory/__main__.py
+++ b/swiftstory/__main__.py
@@ -12,7 +12,7 @@ from swiftstory.game_manager import GameManager
from swiftstory.interface.ws import WebsocketsInterface
-async def main() -> None:
+async def amain() -> None:
""" Entry point: we create the game manager and start the Websockets
server. """
parser = argparse.ArgumentParser()
@@ -29,5 +29,11 @@ async def main() -> None:
await server.serve_forever()
+def main() -> None:
+ """Do not remove or make async, it is used as the entry-point (see
+ setup.cfg)"""
+ return asyncio.run(amain())
+
+
if __name__ == '__main__':
- asyncio.run(main())
+ main()