mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Handle epub files which contain opf files with no <metadata> tags
This commit is contained in:
parent
512d608a95
commit
72d2a7e372
@ -692,7 +692,11 @@ class Container(object): # {{{
|
||||
return item
|
||||
|
||||
def format_opf(self):
|
||||
try:
|
||||
mdata = self.opf_xpath('//opf:metadata')[0]
|
||||
except IndexError:
|
||||
pass
|
||||
else:
|
||||
mdata.text = '\n '
|
||||
remove = set()
|
||||
for child in mdata:
|
||||
|
Loading…
x
Reference in New Issue
Block a user