# HG changeset patch # User Sylvain Thénault # Date 1297420630 -3600 # Node ID a8fbcf9b65729ec0ee1d13d4aea8a82690cdca31 # Parent cac71b8a87118a5462d67de20a85007591c0e900 [testlib] take care, validator may be None diff -r cac71b8a8711 -r a8fbcf9b6572 devtools/testlib.py --- 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 used in progress widget, unknown in html dtd output = re.sub('', '', output)