From 6dbdc06a46b1597055f7f2cdca340b91f94db34d Mon Sep 17 00:00:00 2001 From: Seth Michael Larson Date: Fri, 28 Aug 2020 11:50:20 -0500 Subject: [PATCH] more --- src/urllib3/connectionpool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py index d62f1f6642..db5ea8cebb 100644 --- a/src/urllib3/connectionpool.py +++ b/src/urllib3/connectionpool.py @@ -401,11 +401,11 @@ def _make_request( pass except Exception as e: print("ERROR=", e, e.args, "errno=", getattr(e, "errno", None)) - # Python 2, Windows + # Python 2, Windows, macOS # EPIPE and ESHUTDOWN are BrokenPipeError on Python 2, and EPROTOTYPE is needed on macOS # https://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/ # Windows is ConnectionAborted which can mean that a connection hung up. - if e.errno not in { + if getattr(e, "errno", None) not in { errno.EPIPE, errno.ESHUTDOWN, errno.EPROTOTYPE,