mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-13 14:53:32 +01:00
py3: Fix spurious warning when reading EPUB metadata
This commit is contained in:
parent
46b9a7a325
commit
dce8ea7719
1 changed files with 2 additions and 2 deletions
|
|
@ -92,11 +92,11 @@ class OCFReader(OCF):
|
|||
|
||||
def __init__(self):
|
||||
try:
|
||||
mimetype = self.open('mimetype').read().rstrip()
|
||||
mimetype = self.open('mimetype').read().decode('utf-8').rstrip()
|
||||
if mimetype != OCF.MIMETYPE:
|
||||
print('WARNING: Invalid mimetype declaration', mimetype)
|
||||
except:
|
||||
print('WARNING: Epub doesn\'t contain a mimetype declaration')
|
||||
print('WARNING: Epub doesn\'t contain a valid mimetype declaration')
|
||||
|
||||
try:
|
||||
with closing(self.open(OCF.CONTAINER_PATH)) as f:
|
||||
|
|
|
|||
Loading…
Reference in a new issue