From dc0ea1959cd77534ffc0ee42be5db35266bbd99c Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 15 Oct 2021 23:03:24 -0700 Subject: [PATCH] Return 1 when ending by ctrlc. --- hnarchive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hnarchive.py b/hnarchive.py index c4dab98..81936d1 100644 --- a/hnarchive.py +++ b/hnarchive.py @@ -62,6 +62,7 @@ def ctrlc_commit(function): return function(*args, **kwargs) except KeyboardInterrupt: commit() + return 1 return wrapped def int_or_none(x): @@ -393,7 +394,7 @@ def update_items_argparse(args): log.info('Updating %d items.', len(ids)) if not ids: - return + return 0 ids = [id for (id,) in ids] items = get_items(ids, threads=args.threads)