From 307c88cd5061f04ca02a587262b56d5703930f0a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 12 Feb 2020 14:32:54 -0800 Subject: [PATCH] Minor whitespace. --- pixelcanvas.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pixelcanvas.py b/pixelcanvas.py index e6e12cc..1ac32d8 100644 --- a/pixelcanvas.py +++ b/pixelcanvas.py @@ -175,12 +175,15 @@ def download_bigchunk_range(bigchunk_xy1, bigchunk_xy2, threads=1): download multiple bigchunks, and yield all of the small chunks. ''' bigchunks = bigchunk_range_iterator(bigchunk_xy1, bigchunk_xy2) + if threads < 1: raise ValueError(threads) + if threads == 1: for (x, y) in bigchunks: chunks = download_bigchunk(x, y) yield from chunks + else: pool = threadpool.ThreadPool(size=threads) jobs = []