From 0b1aabc64dca6bb98925bf824f7ca072a27259cc Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Wed, 14 Aug 2013 16:15:42 +0000 Subject: [PATCH] Add extra exception trap to test crawler to output URL under test for None responses - Legacy-Id: 6056 --- ietf/bin/test-crawl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ietf/bin/test-crawl b/ietf/bin/test-crawl index f48c9abc3..ca9b331f9 100755 --- a/ietf/bin/test-crawl +++ b/ietf/bin/test-crawl @@ -82,9 +82,15 @@ while urls: ctype = ctype[:ctype.index(";")] if ctype == "text/html": - for u in extract_html_urls(r.content): - if u not in visited and u not in urls: - urls[u] = url + try: + for u in extract_html_urls(r.content): + if u not in visited and u not in urls: + urls[u] = url + except: + print "error extracting HTML urls from", url + print "=============" + print traceback.format_exc() + print "=============" else: tags.append(u"FAIL (from %s)" % referrer)