Use a with block for reading the cpuinfo file.
When loading the file fails (or we're not on Linux)
return an empty string. Since all the callers are
going to do "x in self.getCPUInfo()".
Paths
| Differential D99729
[lldb] Improve CPUInfo test predicate ClosedPublic Authored by DavidSpickett on Apr 1 2021, 7:31 AM.
Details
Summary Use a with block for reading the cpuinfo file. When loading the file fails (or we're not on Linux)
Diff Detail
Event TimelineDavidSpickett created this revision. This revision is now accepted and ready to land.Apr 6 2021, 2:36 AM Closed by commit rGf8f4d8f87ba4: [lldb] Improve CPUInfo test predicate (authored by DavidSpickett). · Explain WhyApr 6 2021, 2:46 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 335445 lldb/packages/Python/lldbsuite/test/lldbtest.py
|