Issue #27289: Prevent test_urllib2net failures due to EOFError raised by ftplib

This commit is contained in:
Berker Peksag 2016-06-12 16:27:48 +03:00
parent 46fe29de31
commit c74cdc7170
1 changed files with 2 additions and 1 deletions

View File

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