cssutils has recently renamed CSSValueList to PropertyValue. Fix resulting breakage in src/calibre/ebooks/oeb/stylizer.py

This commit is contained in:
koehler 2011-06-05 14:15:09 +02:00
parent 4a8d33a455
commit 14dc0006d0

View File

@ -13,7 +13,11 @@ from weakref import WeakKeyDictionary
from xml.dom import SyntaxErr as CSSSyntaxError
import cssutils
from cssutils.css import (CSSStyleRule, CSSPageRule, CSSStyleDeclaration,
CSSValueList, CSSFontFaceRule, cssproperties)
CSSFontFaceRule, cssproperties)
try:
from cssutils.css import CSSValueList
except ImportError:
from cssutils.css import PropertyValue as CSSValueList
from cssutils import profile as cssprofiles
from lxml import etree
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError