mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e3e5cb55bb
commit
bbd635c57b
@ -94,6 +94,8 @@ class OCFReader(OCF):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
raise EPubException("missing OCF container.xml file")
|
raise EPubException("missing OCF container.xml file")
|
||||||
self.opf_path = self.container[OPF.MIMETYPE]
|
self.opf_path = self.container[OPF.MIMETYPE]
|
||||||
|
if not self.opf_path:
|
||||||
|
raise EPubException("missing OPF package file entry in container")
|
||||||
try:
|
try:
|
||||||
with closing(self.open(self.opf_path)) as f:
|
with closing(self.open(self.opf_path)) as f:
|
||||||
self.opf = OPF(f, self.root, populate_spine=False)
|
self.opf = OPF(f, self.root, populate_spine=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user