Skip to content

Commit ad9d0cb

Browse files
committed
fix: sys.exit if KeyboardInterrupt instead of pass
1 parent f4c19ca commit ad9d0cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fichub_cli/utils/fetch_data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import typer
16+
import sys
1617
from tqdm import tqdm
1718
from colorama import Fore
1819
from loguru import logger
@@ -128,7 +129,7 @@ def get_fic_with_infile(self, infile: str):
128129
"No new urls found! If output.log exists, please clear it.")
129130

130131
except KeyboardInterrupt:
131-
pass
132+
sys.exit(2)
132133

133134
finally:
134135
if self.changelog:
@@ -210,7 +211,7 @@ def get_fic_with_list(self, list_url: str):
210211
"No new urls found! If output.log exists, please clear it.")
211212

212213
except KeyboardInterrupt:
213-
pass
214+
sys.exit(2)
214215

215216
finally:
216217
if self.changelog:

0 commit comments

Comments
 (0)