From c0a59059f5dc53017f8e547c608640d5597f78c3 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 9 Nov 2020 11:07:34 -0800 Subject: [PATCH] Go ahead and bail if no ids to update. --- hnarchive.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hnarchive.py b/hnarchive.py index 9d1be57..9c9b9cc 100644 --- a/hnarchive.py +++ b/hnarchive.py @@ -387,6 +387,10 @@ def update_items_argparse(args): ids = cur.fetchall() log.info('Updating %d items.', len(ids)) + + if not ids: + return + ids = [id for (id,) in ids] items = get_items(ids, threads=args.threads)