Fix #3016 (lxml.etree._Element' object has no attribute 'href)

This commit is contained in:
Kovid Goyal 2009-07-31 12:22:26 -06:00
parent bb83f91018
commit b166016da5

View File

@ -137,6 +137,11 @@ class Stylizer(object):
'Stylesheet %r referenced by file %r not in manifest' %
(path, item.href))
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)
for x in (extra_css, user_css):
if x: