diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index dc73862022..ed1d2a576c 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -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