mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
pep8
This commit is contained in:
parent
b1101b7693
commit
5048ecbf84
@ -133,8 +133,7 @@ class Stylizer(object):
|
||||
log=logging.getLogger('calibre.css'))
|
||||
self.font_face_rules = []
|
||||
for elem in style_tags:
|
||||
if (elem.tag == XHTML('style') and
|
||||
elem.get('type', CSS_MIME) in OEB_STYLES and media_ok(elem.get('media'))):
|
||||
if (elem.tag == XHTML('style') and elem.get('type', CSS_MIME) in OEB_STYLES and media_ok(elem.get('media'))):
|
||||
text = elem.text if elem.text else u''
|
||||
for x in elem:
|
||||
t = getattr(x, 'text', None)
|
||||
@ -171,11 +170,10 @@ class Stylizer(object):
|
||||
replaceUrls(stylesheet, item.abshref,
|
||||
ignoreImportRules=True)
|
||||
stylesheets.append(stylesheet)
|
||||
elif (elem.tag == XHTML('link') and elem.get('href') and
|
||||
elem.get('rel', 'stylesheet').lower() == 'stylesheet' and
|
||||
elem.get('type', CSS_MIME).lower() in OEB_STYLES and
|
||||
media_ok(elem.get('media'))
|
||||
):
|
||||
elif (elem.tag == XHTML('link') and elem.get('href') and elem.get(
|
||||
'rel', 'stylesheet').lower() == 'stylesheet' and elem.get(
|
||||
'type', CSS_MIME).lower() in OEB_STYLES and media_ok(elem.get('media'))
|
||||
):
|
||||
href = urlnormalize(elem.attrib['href'])
|
||||
path = item.abshref(href)
|
||||
sitem = oeb.manifest.hrefs.get(path, None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user