diff --git a/numexpr/tests/test_numexpr.py b/numexpr/tests/test_numexpr.py index 2aa56ca..e24566f 100644 --- a/numexpr/tests/test_numexpr.py +++ b/numexpr/tests/test_numexpr.py @@ -1334,15 +1334,13 @@ def print_versions(): print('Python version: %s' % sys.version) (sysname, nodename, release, os_version, machine, processor) = platform.uname() print('Platform: %s-%s-%s' % (sys.platform, machine, os_version)) - try: - # cpuinfo doesn't work on OSX well it seems, so protect these outputs - # with a try block - cpu_info = cpu.info[0] + if type(cpu).__name__ != 'CPUInfoBase': + cpu_info = cpu.info + if isinstance(cpu_info, list): + cpu_info = cpu_info[0] print('CPU vendor: %s' % cpu_info.get('VendorIdentifier', '')) print('CPU model: %s' % cpu_info.get('ProcessorNameString', '')) print('CPU clock speed: %s MHz' % cpu_info.get('~MHz','')) - except KeyError: - pass print('VML available? %s' % use_vml) if use_vml: print('VML/MKL version: %s' % numexpr.get_vml_version())