Skip to content

Commit 40a3ed9

Browse files
fix: don't interrupt batch download on HTTP errors (#169)
1 parent c1dea0e commit 40a3ed9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

kobodl/actions.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,18 +267,18 @@ def GetBookOrBooks(
267267
try:
268268
click.echo(f'Downloading {currentProductId} to {outputFilePath}', err=True)
269269
kobo.Download(bookMetadata, book_type == BookType.AUDIOBOOK, outputFilePath)
270-
except KoboException as e:
270+
except Exception as e:
271271
if productId:
272272
raise e
273-
else:
274-
click.echo(
275-
(
276-
f'Skipping failed download for {currentProductId}: {str(e)}'
277-
'\n -- Try downloading it as a single book to get the complete exception details'
278-
' and open an issue on the project GitHub page: https://github.com/subdavis/kobo-book-downloader/issues'
279-
),
280-
err=True,
281-
)
273+
274+
click.echo(
275+
(
276+
f'Skipping failed download for {currentProductId}: {str(e)}'
277+
'\n -- Try downloading it as a single book to get the complete exception details'
278+
' and open an issue on the project GitHub page: https://github.com/subdavis/kobo-book-downloader/issues'
279+
),
280+
err=True,
281+
)
282282

283283
if productId:
284284
# TODO: support audiobook downloads from web

0 commit comments

Comments
 (0)