mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #996439 ('NoneType' object has no attribute 'partition' (Error Code: 1) when converitng to AWZ3)
This commit is contained in:
parent
0458a601e8
commit
cf97f6228a
@ -316,7 +316,7 @@ class KF8Writer(object):
|
||||
# Flatten the ToC into a depth first list
|
||||
fl = toc.iter() if is_periodical else toc.iterdescendants()
|
||||
for i, item in enumerate(fl):
|
||||
entry = {'id': id(item), 'index': i, 'href':item.href,
|
||||
entry = {'id': id(item), 'index': i, 'href':item.href or '',
|
||||
'label':(item.title or _('Unknown')),
|
||||
'children':[]}
|
||||
entry['depth'] = getattr(item, 'ncx_hlvl', 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user