mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 19:53:12 +02:00
...
This commit is contained in:
parent
e3e5cb55bb
commit
bbd635c57b
1 changed files with 2 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ def __init__(self):
|
|||
except KeyError:
|
||||
raise EPubException("missing OCF container.xml file")
|
||||
self.opf_path = self.container[OPF.MIMETYPE]
|
||||
if not self.opf_path:
|
||||
raise EPubException("missing OPF package file entry in container")
|
||||
try:
|
||||
with closing(self.open(self.opf_path)) as f:
|
||||
self.opf = OPF(f, self.root, populate_spine=False)
|
||||
|
|
|
|||
Loading…
Reference in a new issue