From 14dc0006d0c6a86e7d680b6284444d2cdb279741 Mon Sep 17 00:00:00 2001 From: koehler Date: Sun, 5 Jun 2011 14:15:09 +0200 Subject: [PATCH] cssutils has recently renamed CSSValueList to PropertyValue. Fix resulting breakage in src/calibre/ebooks/oeb/stylizer.py --- src/calibre/ebooks/oeb/stylizer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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