From 769240dbb82a6d767e7216869d0f8885904e2030 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 27 Mar 2022 15:36:34 -0700 Subject: [PATCH] Let threads default to 1 instead of None. --- hnarchive.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hnarchive.py b/hnarchive.py index a232628..815e03e 100644 --- a/hnarchive.py +++ b/hnarchive.py @@ -117,7 +117,7 @@ def get_item(id): return item def get_items(ids, threads=None): - if threads: + if threads and threads > 1: return get_items_multithreaded(ids, threads) else: return get_items_singlethreaded(ids) @@ -587,7 +587,7 @@ def main(argv): p_get.add_argument( '--threads', type=int, - default=None, + default=1, help=''' Use this many threads to download items. ''', @@ -662,7 +662,7 @@ def main(argv): p_update.add_argument( '--threads', type=int, - default=None, + default=1, help=''' Use this many threads to download items. ''', @@ -704,7 +704,7 @@ def main(argv): p_update_items.add_argument( '--threads', type=int, - default=None, + default=1, help=''' Use this many threads to download items. ''',