diff options
Diffstat (limited to 'Lib/test/support/__init__.py')
-rw-r--r-- | Lib/test/support/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d98068c..32b5687 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1324,6 +1324,8 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()): n = getattr(err, 'errno', None) if (isinstance(err, socket.timeout) or (isinstance(err, socket.gaierror) and n in gai_errnos) or + (isinstance(err, urllib.error.HTTPError) and + 500 <= err.code <= 599) or (isinstance(err, urllib.error.URLError) and "ConnectionRefusedError" in err.reason) or n in captured_errnos): |