mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4664 (conversion of a comic collection fails if the comics.txt contains a blank line)
This commit is contained in:
parent
0b4de38330
commit
cb753ba603
@ -340,6 +340,9 @@ class ComicInput(InputFormatPlugin):
|
|||||||
%stream.name)
|
%stream.name)
|
||||||
for line in open('comics.txt',
|
for line in open('comics.txt',
|
||||||
'rb').read().decode('utf-8').splitlines():
|
'rb').read().decode('utf-8').splitlines():
|
||||||
|
line = line.strip()
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
fname, title = line.partition(':')[0], line.partition(':')[-1]
|
fname, title = line.partition(':')[0], line.partition(':')[-1]
|
||||||
fname = os.path.join(tdir, *fname.split('/'))
|
fname = os.path.join(tdir, *fname.split('/'))
|
||||||
if not title:
|
if not title:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user