amanusk / s-tui

Terminal-based CPU stress and monitoring utility
https://amanusk.github.io/s-tui/
GNU General Public License v2.0
4.01k stars 139 forks source link

Fixes for macOS. #190

Closed AndreasPantle closed 2 years ago

AndreasPantle commented 2 years ago

It solves the issues:

49

27

amanusk commented 2 years ago

Thank you for the PR! Sorry it took me so long to notice it. Need to check my notifications :)

I don't currently have hardware to test this on. What did you use to test this? Thanks!

Edit: Oh, I see, it tries to probe the sensors and not assume they are supported by psuitl. Yea, that should be the better approach. I was trying to avoid necessary try-catches, but this is what needed in this case

AndreasPantle commented 2 years ago

I did a test on a MacBook Pro and an older MacMini. But I think it should't depending on the model.

I have no possibility to catch the errors in other cases. Guess it seems the only way, otherwise:

>>> import platform
>>> platform.system()
'Darwin'

But this wouldn't be better...?