8000 BUG: Use ImportError instead of bare except · numpy/numpy@a0f0d16 · GitHub
[go: up one dir, main page]

Skip to content

Commit a0f0d16

Browse files
committed
BUG: Use ImportError instead of bare except
1 parent b92f698 commit a0f0d16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/core/tests/test_umath.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def get_glibc_version():
2222
ver = 0.0
2323
try:
2424
ver = float(os.confstr('CS_GNU_LIBC_VERSION').rsplit(' ')[1])
25-
except:
26-
print("Couldn't capture GLIBC version")
25+
except ImportError as err:
26+
print(err.message)
2727

2828
return ver
2929

0 commit comments

Comments
 (0)
0