nvme temp fix?
This commit is contained in:
@ -840,8 +840,11 @@ class SystemHealthMonitor:
|
|||||||
)
|
)
|
||||||
for line in nvme_result.stdout.split('\n'):
|
for line in nvme_result.stdout.split('\n'):
|
||||||
if 'temperature' in line.lower():
|
if 'temperature' in line.lower():
|
||||||
smart_health['temp'] = int(line.split(':')[1].strip().split()[0])
|
temp_str = line.split(':')[1].strip()
|
||||||
break
|
# Extract numeric temperature value
|
||||||
|
temp_value = int(''.join(filter(str.isdigit, temp_str)))
|
||||||
|
smart_health['temp'] = temp_value
|
||||||
|
break
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
smart_health['status'] = 'ERROR'
|
smart_health['status'] = 'ERROR'
|
||||||
|
|||||||
Reference in New Issue
Block a user