mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fetch-ebook-metadata: Fix an error when using the --cover option and no cover is found. Fixes #1938189 [fetch-ebook-metadata sometimes fails with -c switch](https://bugs.launchpad.net/calibre/+bug/1938189)
This commit is contained in:
parent
4c168fd409
commit
c3aed85cbf
@ -90,8 +90,9 @@ def main(args=sys.argv):
|
||||
if opts.cover and results:
|
||||
cover = download_cover(log, title=opts.title, authors=authors,
|
||||
identifiers=result.identifiers, timeout=int(opts.timeout))
|
||||
if cover is None and not opts.opf:
|
||||
prints('No cover found', file=sys.stderr)
|
||||
if cover is None:
|
||||
if not opts.opf:
|
||||
prints('No cover found', file=sys.stderr)
|
||||
else:
|
||||
save_cover_data_to(cover[-1], opts.cover)
|
||||
result.cover = cf = opts.cover
|
||||
|
Loading…
x
Reference in New Issue
Block a user