Add suppress KeyboardInterrupt
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
from rich import print
|
from rich import print
|
||||||
|
import contextlib
|
||||||
|
|
||||||
|
|
||||||
async def runner():
|
async def runner():
|
||||||
@@ -25,4 +26,7 @@ def main():
|
|||||||
apply()
|
apply()
|
||||||
|
|
||||||
print('Starting...')
|
print('Starting...')
|
||||||
asyncio.run(runner())
|
with contextlib.suppress(KeyboardInterrupt):
|
||||||
|
asyncio.run(runner())
|
||||||
|
|
||||||
|
print('[red]Stopped.[/]')
|
||||||
|
|||||||
Reference in New Issue
Block a user