Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.

This commit is contained in:
Ned Deily 2015-03-22 01:14:48 -07:00
parent d357b89f0b
commit ce8f5ded65
2 changed files with 4 additions and 1 deletions

View file

@ -1327,7 +1327,8 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()):
(isinstance(err, urllib.error.HTTPError) and
500 <= err.code <= 599) or
(isinstance(err, urllib.error.URLError) and
"ConnectionRefusedError" in err.reason) or
(("ConnectionRefusedError" in err.reason) or
("TimeoutError" in err.reason))) or
n in captured_errnos):
if not verbose:
sys.stderr.write(denied.args[0] + "\n")