mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
cssutils has recently renamed CSSValueList to PropertyValue. Fix resulting breakage in src/calibre/ebooks/oeb/stylizer.py
This commit is contained in:
parent
4a8d33a455
commit
14dc0006d0
@ -13,7 +13,11 @@ from weakref import WeakKeyDictionary
|
|||||||
from xml.dom import SyntaxErr as CSSSyntaxError
|
from xml.dom import SyntaxErr as CSSSyntaxError
|
||||||
import cssutils
|
import cssutils
|
||||||
from cssutils.css import (CSSStyleRule, CSSPageRule, CSSStyleDeclaration,
|
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 cssutils import profile as cssprofiles
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
|
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
|
||||||
|
Loading…
x
Reference in New Issue
Block a user