Commit 9886219
committed
Make the statistics collection safer/possible on macOS.
The stats.py module pulls in a package which might not be installed,
and isn't present on my macOS system - the pyamdgpuinfo package. This
change makes the import silent, and allows it to be auto-detected
as absent, rather than failing to run.
Similarly, the psutil package doesn't appear to provide the
sensors_temperature interface, so this has been made safe if it is not
present.1 parent dee8833 commit 9886219
1 file changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
302 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
| |||
0 commit comments