diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-06-03 13:41:26 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-06-03 13:59:51 +0100 |
commit | 1608e53072b035bd40de7a202e75354f0e802120 (patch) | |
tree | a530210ff9fa4f44e1e3061af05df3f55ec96c35 /numpy/lib/utils.py | |
parent | 0e4610e30aabaf32c037fc94c869a20f2435a8f1 (diff) | |
download | numpy-1608e53072b035bd40de7a202e75354f0e802120.tar.gz |
BUG: KeyboardInterrupt is swallowed all over the place
Bare except is very rarely the right thing
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index fad159c7e..6e150add3 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -557,7 +557,7 @@ def info(object=None, maxwidth=76, output=sys.stdout, toplevel='numpy'): if len(arglist) > 1: arglist[1] = "("+arglist[1] arguments = ", ".join(arglist[1:]) - except: + except Exception: pass if len(name+arguments) > maxwidth: @@ -689,7 +689,7 @@ def source(object, output=sys.stdout): try: print("In file: %s\n" % inspect.getsourcefile(object), file=output) print(inspect.getsource(object), file=output) - except: + except Exception: print("Not available for this object.", file=output) |