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/distutils/cpuinfo.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/distutils/cpuinfo.py')
-rw-r--r-- | numpy/distutils/cpuinfo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py index 652826376..33b3ee2ef 100644 --- a/numpy/distutils/cpuinfo.py +++ b/numpy/distutils/cpuinfo.py @@ -75,7 +75,7 @@ class CPUInfoBase(object): def _try_call(self, func): try: return func() - except: + except Exception: pass def __getattr__(self, name): @@ -336,7 +336,7 @@ class IRIXCPUInfo(CPUInfoBase): def get_ip(self): try: return self.info.get('MACHINE') - except: pass + except Exception: pass def __machine(self, n): return self.info.get('MACHINE').lower() == 'ip%s' % (n) def _is_IP19(self): return self.__machine(19) @@ -523,7 +523,7 @@ class Win32CPUInfo(CPUInfoBase): info[-1]["Family"]=int(srch.group("FML")) info[-1]["Model"]=int(srch.group("MDL")) info[-1]["Stepping"]=int(srch.group("STP")) - except: + except Exception: print(sys.exc_info()[1], '(ignoring)') self.__class__.info = info |