diff options
Diffstat (limited to 'numpy/distutils/cpuinfo.py')
-rw-r--r-- | numpy/distutils/cpuinfo.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py index 652826376..580299347 100644 --- a/numpy/distutils/cpuinfo.py +++ b/numpy/distutils/cpuinfo.py @@ -35,7 +35,7 @@ def getoutput(cmd, successful_status=(0,), stacklevel=1): except EnvironmentError: e = get_exception() warnings.warn(str(e), UserWarning, stacklevel=stacklevel) - return False, output + return False, "" if os.WIFEXITED(status) and os.WEXITSTATUS(status) in successful_status: return True, output return False, output @@ -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 |