Fix #7919 (Conversion error)

This commit is contained in:
Kovid Goyal 2010-12-16 08:52:31 -07:00
parent 4b7705fbbe
commit 8e787097ac

View File

@ -205,7 +205,10 @@ class Stylizer(object):
NameError, # thrown on OS X instead of SelectorSyntaxError
SelectorSyntaxError):
continue
matches = selector(tree)
try:
matches = selector(tree)
except etree.XPathEvalError:
continue
if not matches:
ntext = capital_sel_pat.sub(lambda m: m.group().lower(), text)