lib: rename inner error variable in is_conn_err()
Rename this variable to something easier to understand.
This commit is contained in:
parent
1cc6c79157
commit
eaa5bf9add
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue