File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33
4- from typer import echo
5-
64import ellar_cli .click as click
75
86from .main import app_cli
1311@app_cli .command ()
1412@click .argument ("name" )
1513def say_hi (name : str ):
16- echo (f"Welcome { name } , to Ellar CLI, ASGI Python Web framework\n " )
14+ click . echo (f"Welcome { name } , to Ellar CLI, ASGI Python Web framework\n " )
1715
1816
1917def main ():
Original file line number Diff line number Diff line change @@ -16,11 +16,14 @@ def _async_run(future: t.Coroutine) -> t.Any:
1616 loop = asyncio .new_event_loop ()
1717
1818 if not loop .is_running ():
19- res = loop .run_until_complete (loop .create_task (future ))
20-
21- loop .run_until_complete (loop .shutdown_asyncgens ())
22- loop .stop ()
23- loop .close ()
19+ try :
20+ res = loop .run_until_complete (loop .create_task (future ))
21+ loop .run_until_complete (loop .shutdown_asyncgens ())
22+ except Exception as e :
23+ raise e
24+ finally :
25+ loop .stop ()
26+ loop .close ()
2427 else :
2528 res = execute_coroutine_with_sync_worker (future )
2629
You can’t perform that action at this time.
0 commit comments