mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 05:36:00 +01: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
1 changed files with 3 additions and 0 deletions
|
|
@ -340,6 +340,9 @@ def get_comics_from_collection(self, stream):
|
|||
%stream.name)
|
||||
for line in open('comics.txt',
|
||||
'rb').read().decode('utf-8').splitlines():
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
fname, title = line.partition(':')[0], line.partition(':')[-1]
|
||||
fname = os.path.join(tdir, *fname.split('/'))
|
||||
if not title:
|
||||
|
|
|
|||
Loading…
Reference in a new issue