diff options
| author | Cody Logan <cody@lokken.dev> | 2023-10-20 12:59:08 -0700 |
|---|---|---|
| committer | Cody Logan <cody@lokken.dev> | 2023-10-20 12:59:08 -0700 |
| commit | ba1f10666554316c262efd2ee6950560560317c7 (patch) | |
| tree | 33f3fafe9a647ba43e9505ad0ba51695a66e920f /src | |
| parent | 06335ba0176cabd84f5b548995f465ac1c09bc8e (diff) | |
| download | wikiget-ba1f10666554316c262efd2ee6950560560317c7.tar.gz wikiget-ba1f10666554316c262efd2ee6950560560317c7.zip | |
Fix bug in batch downloading
An invalid line in the batch file would cause the last valid file to
be downloaded twice.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wikiget/wikiget.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wikiget/wikiget.py b/src/wikiget/wikiget.py index 4446f96..af13bc8 100644 --- a/src/wikiget/wikiget.py +++ b/src/wikiget/wikiget.py @@ -181,10 +181,12 @@ def batch_download(args): file = prep_download(line, args) except ParseError as e: logging.warning(f"{e} (line {line_num})") + continue except (ConnectionError, HTTPError, InvalidResponse, LoginError, APIError): logging.error( f"Unable to download '{line}' (line {line_num}) due to an error" ) + continue future = executor.submit(download, file, args) futures.append(future) # wait for downloads to finish |
