From 5fc84d869610f4c386de0acef1a54126ee417aee Mon Sep 17 00:00:00 2001 From: Vlad Pronsky Date: Fri, 5 Jan 2024 04:51:11 +0200 Subject: [PATCH] handle KeyboardInterrupt in cli --- twscrape/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twscrape/cli.py b/twscrape/cli.py index c0a7dce..ce6ab9b 100644 --- a/twscrape/cli.py +++ b/twscrape/cli.py @@ -193,4 +193,7 @@ def run(): if args.command is None: return custom_help(p) - asyncio.run(main(args)) + try: + asyncio.run(main(args)) + except KeyboardInterrupt: + pass