Commit 9ad4e16
authored
Fix exception from accessing cpu_info when it is None
If `cpuinfo` fails to import, then `cpu_info` is set to `None` at the top of this file. But in the `sse2` check, `cpu_info` is accessed without first checking if it is `None`, causing the build to fail.
This fix errs on the conservative side, assuming that we do not want to build SSE2 if `cpu_info` could not be imported. It's possible a similar change is needed on the next line for AVX2, but I wasn't sure why there was no `'avx2' not in cpu_info['flags']` condition there.1 parent c8ae646 commit 9ad4e16
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments