mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'syntax' of https://github.com/eli-schwartz/calibre
This commit is contained in:
commit
5ab3c7b727
@ -62,7 +62,7 @@ class UserFields(object):
|
|||||||
self.document = None
|
self.document = None
|
||||||
|
|
||||||
def loaddoc(self):
|
def loaddoc(self):
|
||||||
if isinstance(self.src_file, (bytes, type(u'')):
|
if isinstance(self.src_file, (bytes, type(u''))):
|
||||||
# src_file is a filename, check if it is a zip-file
|
# src_file is a filename, check if it is a zip-file
|
||||||
if not zipfile.is_zipfile(self.src_file):
|
if not zipfile.is_zipfile(self.src_file):
|
||||||
raise TypeError("%s is no odt file." % self.src_file)
|
raise TypeError("%s is no odt file." % self.src_file)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user