This commit is contained in:
Kovid Goyal 2016-04-08 09:09:37 +05:30
parent e3e5cb55bb
commit bbd635c57b

View File

@ -94,6 +94,8 @@ class OCFReader(OCF):
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)