From ad9d0cbff2d3a6d3e51b36c0c90647da687242b9 Mon Sep 17 00:00:00 2001 From: Arbaaz Laskar Date: Wed, 12 Jul 2023 23:30:43 +0530 Subject: [PATCH] fix: sys.exit if KeyboardInterrupt instead of pass --- fichub_cli/utils/fetch_data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fichub_cli/utils/fetch_data.py b/fichub_cli/utils/fetch_data.py index 0e349f9..4d106ef 100644 --- a/fichub_cli/utils/fetch_data.py +++ b/fichub_cli/utils/fetch_data.py @@ -13,6 +13,7 @@ # limitations under the License. import typer +import sys from tqdm import tqdm from colorama import Fore from loguru import logger @@ -128,7 +129,7 @@ def get_fic_with_infile(self, infile: str): "No new urls found! If output.log exists, please clear it.") except KeyboardInterrupt: - pass + sys.exit(2) finally: if self.changelog: @@ -210,7 +211,7 @@ def get_fic_with_list(self, list_url: str): "No new urls found! If output.log exists, please clear it.") except KeyboardInterrupt: - pass + sys.exit(2) finally: if self.changelog: