diff --git a/IPython/frontend/qt/rich_text.py b/IPython/frontend/qt/rich_text.py index 778acc5..f7a97f4 100644 --- a/IPython/frontend/qt/rich_text.py +++ b/IPython/frontend/qt/rich_text.py @@ -4,8 +4,6 @@ # Imports #----------------------------------------------------------------------------- -from __future__ import with_statement - # Standard library imports. import os import re @@ -179,7 +177,7 @@ def export_xhtml(html, filename, image_tag=None): # Hack to make xhtml header -- note that we are not doing any check for # valid XML. offset = html.find("") - assert(offset > -1) + assert offset > -1, 'Invalid HTML string: no tag.' html = ('\n'+ html[offset+6:])