lib: rename inner error variable in is_conn_err()

Rename this variable to something easier to understand.
This commit is contained in:
Ken Dreyer 2022-01-04 15:25:32 -05:00 committed by Tomas Kopecek
parent 1cc6c79157
commit eaa5bf9add

View file

@ -2331,9 +2331,9 @@ def is_conn_error(e):
return True
try:
if isinstance(e, requests.exceptions.ConnectionError):
e2 = getattr(e, 'args', [None])[0]
inner_err = getattr(e, 'args', [None])[0]
# same check as unwrapped socket error
if getattr(e2, 'errno', None) in ERRNOS:
if getattr(inner_err, 'errno', None) in ERRNOS:
return True
except (TypeError, AttributeError):
pass