IGN:Change in cssutils profiles API

This commit is contained in:
Kovid Goyal 2009-05-13 10:08:17 -07:00
parent 1c56b03f95
commit 580497d0ee
2 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,8 @@ from xml.dom import SyntaxErr as CSSSyntaxError
import cssutils
from cssutils.css import CSSStyleRule, CSSPageRule, CSSStyleDeclaration, \
CSSValueList, cssproperties
from cssutils.profiles import profiles as cssprofiles
from cssutils.profiles import Profiles
cssprofiles = Profiles()
from lxml import etree
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, CSS_MIME, OEB_STYLES

View File

@ -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,7 +86,7 @@ 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)