devtools/testlib.py
branchstable
changeset 6979 a8fbcf9b6572
parent 6978 cac71b8a8711
child 6980 8e59c2cdcc99
child 7038 fe0afc4e8ebb
--- a/devtools/testlib.py	Fri Feb 11 11:29:23 2011 +0100
+++ b/devtools/testlib.py	Fri Feb 11 11:37:10 2011 +0100
@@ -774,6 +774,8 @@
         """raises an exception if the HTML is invalid"""
         output = output.strip()
         validator = self.get_validator(view, output=output)
+        if validator is None:
+            return
         if isinstance(validator, htmlparser.DTDValidator):
             # XXX remove <canvas> used in progress widget, unknown in html dtd
             output = re.sub('<canvas.*?></canvas>', '', output)