Skip to content

Commit 2129148

Browse files
authored
Merge pull request #11 from lsst-dm/IT-5635/s3daemon-oci-fix-script
fix cli script; asyncio.run must be called
2 parents 69080f2 + 11850f0 commit 2129148

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

python/s3daemon/s3daemon.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async def handle_client(client, reader, writer):
7676
log.info("%f %f sec", start, time.time() - start)
7777

7878

79-
async def main():
79+
async def go():
8080
"""Start the server."""
8181
session = aiobotocore.session.get_session()
8282
async with session.create_client(
@@ -96,5 +96,10 @@ async def client_cb(reader, writer):
9696
await server.serve_forever()
9797

9898

99+
def main():
100+
"""CLI script entry point."""
101+
asyncio.run(go())
102+
103+
99104
if __name__ == "__main__":
100-
asyncio.run(main())
105+
main()

0 commit comments

Comments
 (0)