Merge branch 'Username404-59-dev-patch-44249' into 'tweak/cpu-attribute-error'

Fix cpu_freq call catching on obscure systems

See merge request crafty-controller/crafty-4!754
This commit is contained in:
Iain Powrie 2024-07-09 01:12:11 +00:00
commit b0afc80b73

View File

@ -86,7 +86,7 @@ class Stats:
def get_node_stats(self) -> NodeStatsReturnDict:
try:
cpu_freq = psutil.cpu_freq()
except (NotImplementedError, FileNotFoundError):
except (NotImplementedError, AttributeError, FileNotFoundError):
cpu_freq = None
if cpu_freq is None:
cpu_freq = psutil._common.scpufreq(current=-1, min=-1, max=-1)