##// END OF EJS Templates
Remove unnecessary import statement and fix naked assertion.
epatters -
Show More
@@ -4,8 +4,6 b''
4 # Imports
4 # Imports
5 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
6
6
7 from __future__ import with_statement
8
9 # Standard library imports.
7 # Standard library imports.
10 import os
8 import os
11 import re
9 import re
@@ -179,7 +177,7 b' def export_xhtml(html, filename, image_tag=None):'
179 # Hack to make xhtml header -- note that we are not doing any check for
177 # Hack to make xhtml header -- note that we are not doing any check for
180 # valid XML.
178 # valid XML.
181 offset = html.find("<html>")
179 offset = html.find("<html>")
182 assert(offset > -1)
180 assert offset > -1, 'Invalid HTML string: no <html> tag.'
183 html = ('<html xmlns="http://www.w3.org/1999/xhtml">\n'+
181 html = ('<html xmlns="http://www.w3.org/1999/xhtml">\n'+
184 html[offset+6:])
182 html[offset+6:])
185
183
General Comments 0
You need to be logged in to leave comments. Login now