Skip to content

Commit 3cc1ddd

Browse files
author
y-p
committed
BLD: try harder to find errno in @network
1 parent 0a5e36a commit 3cc1ddd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/util/testing.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,9 @@ def wrapper(*args, **kwargs):
10971097
try:
10981098
return t(*args, **kwargs)
10991099
except Exception as e:
1100-
errno = getattr(e,'errno',None)
1100+
errno = getattr(e, 'errno', None)
1101+
if not errno and hasattr(errno, "reason"):
1102+
errno = getattr(e.reason, 'errno', None)
11011103

11021104
if not isinstance(e, error_classes):
11031105
raise

0 commit comments

Comments
 (0)