Catch KeyboardInterrupt

This commit is contained in:
Yuta Hayashibe 2022-10-01 23:43:50 +09:00
parent f46e71f51d
commit b1f98f86ff

View file

@ -214,11 +214,14 @@ def main() -> None:
if opts.mode == "client": if opts.mode == "client":
assert opts.language is None assert opts.language is None
assert opts.model is None assert opts.model is None
asyncio.run( try:
run_websocket_client( asyncio.run(
opts=opts, run_websocket_client(
opts=opts,
)
) )
) except KeyboardInterrupt:
pass
else: else:
assert opts.language is not None assert opts.language is not None
assert opts.model is not None assert opts.model is not None