mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
MOBI Output: Fix download of Chicago Tribune
This commit is contained in:
parent
ec9111aa7f
commit
4af8f1c568
1 changed files with 4 additions and 4 deletions
|
|
@ -27,7 +27,7 @@ class _ErrorHandler(object):
|
|||
"""
|
||||
handles all errors and log messages
|
||||
"""
|
||||
def __init__(self, log, defaultloglevel=logging.INFO,
|
||||
def __init__(self, log, defaultloglevel=logging.INFO,
|
||||
raiseExceptions=True):
|
||||
"""
|
||||
inits log if none given
|
||||
|
|
@ -51,7 +51,7 @@ def __init__(self, log, defaultloglevel=logging.INFO,
|
|||
hdlr.setFormatter(formatter)
|
||||
self._log.addHandler(hdlr)
|
||||
self._log.setLevel(defaultloglevel)
|
||||
|
||||
|
||||
self.raiseExceptions = raiseExceptions
|
||||
|
||||
def __getattr__(self, name):
|
||||
|
|
@ -86,10 +86,10 @@ def __handle(self, msg=u'', token=None, error=xml.dom.SyntaxErr,
|
|||
if error and self.raiseExceptions and not neverraise:
|
||||
if isinstance(error, urllib2.HTTPError) or isinstance(error, urllib2.URLError):
|
||||
raise
|
||||
elif issubclass(error, xml.dom.DOMException):
|
||||
elif issubclass(error, xml.dom.DOMException):
|
||||
error.line = line
|
||||
error.col = col
|
||||
raise error(msg, line, col)
|
||||
raise error(msg)
|
||||
else:
|
||||
raise error(msg)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue