mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Another MOBI output fix
This commit is contained in:
parent
28ade81a03
commit
64b017d12c
@ -19,7 +19,7 @@ from cssutils.css import CSSStyleRule, CSSPageRule, CSSStyleDeclaration, \
|
||||
CSSValueList, cssproperties
|
||||
from cssutils.profiles import profiles as cssprofiles
|
||||
from lxml import etree
|
||||
from lxml.cssselect import css_to_xpath, ExpressionError
|
||||
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
|
||||
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, CSS_MIME, OEB_STYLES
|
||||
from calibre.ebooks.oeb.base import XPNSMAP, xpath, urlnormalize
|
||||
from calibre.ebooks.oeb.profile import PROFILES
|
||||
@ -159,7 +159,9 @@ class Stylizer(object):
|
||||
for _, _, cssdict, text, _ in rules:
|
||||
try:
|
||||
selector = CSSSelector(text)
|
||||
except (AssertionError, ExpressionError, etree.XPathSyntaxError):
|
||||
except (AssertionError, ExpressionError, etree.XPathSyntaxError,\
|
||||
NameError, # gets thrown on OS X instead of SelectorSyntaxError
|
||||
SelectorSyntaxError):
|
||||
continue
|
||||
for elem in selector(tree):
|
||||
self.style(elem)._update_cssdict(cssdict)
|
||||
|
@ -1,9 +1,8 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
''' Post installation script for linux '''
|
||||
import sys, os, re, shutil
|
||||
import sys, os, shutil
|
||||
from subprocess import check_call, call
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
from calibre import __version__, __appname__
|
||||
from calibre.devices import devices
|
||||
|
Loading…
x
Reference in New Issue
Block a user