This commit is contained in:
Kovid Goyal 2009-03-29 23:32:55 -07:00
parent 11d33c0c8b
commit 2ca9cbfa64
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
" Project wide builtins
let g:pyflakes_builtins += ["dynamic_property"]
let g:pyflakes_builtins += ["dynamic_property", "__"]
python << EOFPY
import os

View File

@ -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))

View File

@ -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