diff options
Diffstat (limited to 'testsuite/driver/cpu_features.py')
-rw-r--r-- | testsuite/driver/cpu_features.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/driver/cpu_features.py b/testsuite/driver/cpu_features.py index 6e32d3b445..43500130db 100644 --- a/testsuite/driver/cpu_features.py +++ b/testsuite/driver/cpu_features.py @@ -17,7 +17,8 @@ cpu_feature_cache = None def get_cpu_features(): if config.os in ['mingw32', 'linux'] and os.path.exists('/proc/cpuinfo'): - f = open('/proc/cpuinfo').read() + with open('/proc/cpuinfo') as x: + f = x.read() flags = re.search(r'flags\s*:\s*.*$', f, re.M) if flags is None: print('get_cpu_features: failed to find cpu features') |