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
|
||||
let g:pyflakes_builtins += ["dynamic_property"]
|
||||
let g:pyflakes_builtins += ["dynamic_property", "__"]
|
||||
|
||||
python << EOFPY
|
||||
import os
|
||||
|
@ -508,11 +508,8 @@ class OPF(object):
|
||||
toc.partition('#')[0], toc.partition('#')[-1]
|
||||
self.toc.read_html_toc(toc)
|
||||
except:
|
||||
raise
|
||||
pass
|
||||
|
||||
|
||||
|
||||
def get_text(self, elem):
|
||||
return u''.join(self.CONTENT(elem) or self.TEXT(elem))
|
||||
|
||||
|
@ -201,6 +201,9 @@ def urlnormalize(href):
|
||||
class OEBError(Exception):
|
||||
pass
|
||||
|
||||
class NotHTML(OEBError):
|
||||
pass
|
||||
|
||||
|
||||
class FauxLogger(object):
|
||||
def __getattr__(self, name):
|
||||
@ -538,7 +541,7 @@ class Manifest(object):
|
||||
data = etree.fromstring(data, parser=RECOVER_PARSER)
|
||||
# Force into the XHTML namespace
|
||||
if barename(data.tag) != 'html':
|
||||
raise OEBError(
|
||||
raise NotHTML(
|
||||
'File %r does not appear to be (X)HTML' % self.href)
|
||||
elif not namespace(data.tag):
|
||||
data.attrib['xmlns'] = XHTML_NS
|
||||
|
Loading…
x
Reference in New Issue
Block a user