Skip to content

Commit 0b1aabc

Browse files
committed
Add extra exception trap to test crawler to output URL under test for None responses
- Legacy-Id: 6056
1 parent c182d4e commit 0b1aabc

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

ietf/bin/test-crawl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,15 @@ while urls:
8282
ctype = ctype[:ctype.index(";")]
8383

8484
if ctype == "text/html":
85-
for u in extract_html_urls(r.content):
86-
if u not in visited and u not in urls:
87-
urls[u] = url
85+
try:
86+
for u in extract_html_urls(r.content):
87+
if u not in visited and u not in urls:
88+
urls[u] = url
89+
except:
90+
print "error extracting HTML urls from", url
91+
print "============="
92+
print traceback.format_exc()
93+
print "============="
8894
else:
8995
tags.append(u"FAIL (from %s)" % referrer)
9096

0 commit comments

Comments
 (0)