mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #3016 (lxml.etree._Element' object has no attribute 'href)
This commit is contained in:
parent
bb83f91018
commit
b166016da5
@ -137,6 +137,11 @@ class Stylizer(object):
|
|||||||
'Stylesheet %r referenced by file %r not in manifest' %
|
'Stylesheet %r referenced by file %r not in manifest' %
|
||||||
(path, item.href))
|
(path, item.href))
|
||||||
continue
|
continue
|
||||||
|
if not hasattr(sitem.data, 'cssRules'):
|
||||||
|
self.logger.warn(
|
||||||
|
'Stylesheet %r referenced by file %r is not CSS'%(path,
|
||||||
|
item.href))
|
||||||
|
continue
|
||||||
stylesheets.append(sitem.data)
|
stylesheets.append(sitem.data)
|
||||||
for x in (extra_css, user_css):
|
for x in (extra_css, user_css):
|
||||||
if x:
|
if x:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user