Commit 7fb831a2 by Victor Shnayder

Record warning on bad html files

parent 05c22c49
...@@ -91,7 +91,9 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor): ...@@ -91,7 +91,9 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor):
html = file.read() html = file.read()
# Log a warning if we can't parse the file, but don't error # Log a warning if we can't parse the file, but don't error
if not check_html(html): if not check_html(html):
log.warning("Couldn't parse html in {0}.".format(filepath)) msg = "Couldn't parse html in {0}.".format(filepath)
log.warning(msg)
system.error_tracker("Warning: " + msg)
return {'data' : html} return {'data' : html}
except (ResourceNotFoundError) as err: except (ResourceNotFoundError) as err:
msg = 'Unable to load file contents at path {0}: {1} '.format( msg = 'Unable to load file contents at path {0}: {1} '.format(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment