]> granicus.if.org Git - python/commitdiff
Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
authorNed Deily <nad@acm.org>
Sun, 22 Mar 2015 08:14:48 +0000 (01:14 -0700)
committerNed Deily <nad@acm.org>
Sun, 22 Mar 2015 08:14:48 +0000 (01:14 -0700)
Lib/test/support/__init__.py
Misc/NEWS

index d223242a20859f697b385fdb2c63635fddd0eb16..94a5858a1dbcdb47ab5b4d2510497be3c4bc25bc 100644 (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")
index a4ebd72b4899b4c1c8a9e9664a1046f53e42a4ad..46c3c0a66adca043e3bc023f6ed8ad02fcf857ef 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -455,6 +455,8 @@ Tests
 - Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
   values (like 0.9.8zc).
 
+- Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
+
 Build
 -----