Skip to content

Commit 10f4ce6

Browse files
committed
More exception handling for the reachability test
- Legacy-Id: 853
1 parent 957e14c commit 10f4ce6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ietf/tests.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def testUrlsReachability(self):
305305
try:
306306
code = str(self.client.get(baseurl, args).status_code)
307307
except AssertionError:
308+
note("Exception for URL '%s'" % testurl)
309+
traceback.print_exc()
308310
code = "500"
309311
elif url.startswith("mailto:"):
310312
continue
@@ -315,8 +317,13 @@ def testUrlsReachability(self):
315317
code = "200"
316318
except urllib.HTTPError, e:
317319
code = str(e.code)
320+
except InvalidURL, e:
321+
note("Exception for URL '%s'" % testurl)
322+
traceback.print_exc()
323+
code = "500"
324+
318325
if not code in ["200"]:
319-
note("Reach %5s %s (from %s)" % (code, url, source))
326+
note("Reach %3s %s (from %s)" % (code, url, source))
320327

321328

322329
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)