##// END OF EJS Templates
markup: allow better lxml import failure detection....
marcink -
r2002:1ea54f1f default
parent child Browse files
Show More
@@ -78,6 +78,13 b' def relative_links(html_source, server_p'
78 return html_source
78 return html_source
79
79
80 try:
80 try:
81 from lxml.html import fromstring
82 from lxml.html import tostring
83 except ImportError:
84 log.exception('Failed to import lxml')
85 return html_source
86
87 try:
81 doc = lxml.html.fromstring(html_source)
88 doc = lxml.html.fromstring(html_source)
82 except Exception:
89 except Exception:
83 return html_source
90 return html_source
General Comments 0
You need to be logged in to leave comments. Login now