From 4af8f1c5682e75d543bf97521a7508d5e34f08c2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 1 May 2009 11:27:47 -0700 Subject: [PATCH] MOBI Output: Fix download of Chicago Tribune --- src/cssutils/errorhandler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cssutils/errorhandler.py b/src/cssutils/errorhandler.py index 63eee8bcba..5e7a2f83f7 100644 --- a/src/cssutils/errorhandler.py +++ b/src/cssutils/errorhandler.py @@ -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 @@ class _ErrorHandler(object): hdlr.setFormatter(formatter) self._log.addHandler(hdlr) self._log.setLevel(defaultloglevel) - + self.raiseExceptions = raiseExceptions def __getattr__(self, name): @@ -86,10 +86,10 @@ class _ErrorHandler(object): 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: