mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
11d33c0c8b
commit
2ca9cbfa64
@ -1,5 +1,5 @@
|
|||||||
" Project wide builtins
|
" Project wide builtins
|
||||||
let g:pyflakes_builtins += ["dynamic_property"]
|
let g:pyflakes_builtins += ["dynamic_property", "__"]
|
||||||
|
|
||||||
python << EOFPY
|
python << EOFPY
|
||||||
import os
|
import os
|
||||||
|
@ -508,11 +508,8 @@ class OPF(object):
|
|||||||
toc.partition('#')[0], toc.partition('#')[-1]
|
toc.partition('#')[0], toc.partition('#')[-1]
|
||||||
self.toc.read_html_toc(toc)
|
self.toc.read_html_toc(toc)
|
||||||
except:
|
except:
|
||||||
raise
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_text(self, elem):
|
def get_text(self, elem):
|
||||||
return u''.join(self.CONTENT(elem) or self.TEXT(elem))
|
return u''.join(self.CONTENT(elem) or self.TEXT(elem))
|
||||||
|
|
||||||
|
@ -201,6 +201,9 @@ def urlnormalize(href):
|
|||||||
class OEBError(Exception):
|
class OEBError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class NotHTML(OEBError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class FauxLogger(object):
|
class FauxLogger(object):
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
@ -538,7 +541,7 @@ class Manifest(object):
|
|||||||
data = etree.fromstring(data, parser=RECOVER_PARSER)
|
data = etree.fromstring(data, parser=RECOVER_PARSER)
|
||||||
# Force into the XHTML namespace
|
# Force into the XHTML namespace
|
||||||
if barename(data.tag) != 'html':
|
if barename(data.tag) != 'html':
|
||||||
raise OEBError(
|
raise NotHTML(
|
||||||
'File %r does not appear to be (X)HTML' % self.href)
|
'File %r does not appear to be (X)HTML' % self.href)
|
||||||
elif not namespace(data.tag):
|
elif not namespace(data.tag):
|
||||||
data.attrib['xmlns'] = XHTML_NS
|
data.attrib['xmlns'] = XHTML_NS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user