From c74cdc71705f7d936dfd51b68c26a6eadc2367d1 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Sun, 12 Jun 2016 16:27:48 +0300 Subject: [PATCH] Issue #27289: Prevent test_urllib2net failures due to EOFError raised by ftplib --- Lib/test/support/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index e124fab610c..c9e36fb159f 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -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")