Fixed setting CPU max temp in osTicket
This commit is contained in:
parent
ee58fc1fb9
commit
8643ec2c7c
1 changed files with 4 additions and 3 deletions
|
|
@ -36,7 +36,6 @@ BADBLOCKS_REGEX = re.compile(
|
|||
r'^Pass completed, (\d+) bad blocks found. .(\d+)/(\d+)/(\d+) errors',
|
||||
re.IGNORECASE,
|
||||
)
|
||||
CPU_MAX_TEMP = 0
|
||||
IO_GRAPH_WIDTH = 40
|
||||
IO_ALT_TEST_SIZE_FACTOR = 0.01
|
||||
IO_BLOCK_SIZE = 512 * 1024
|
||||
|
|
@ -747,7 +746,7 @@ def cpu_mprime_test(state, test_objects):
|
|||
# Post results to osTicket
|
||||
if not state.ost.disabled:
|
||||
std.print_info('Posting results to osTicket...')
|
||||
CPU_MAX_TEMP = sensors.cpu_max_temp() # pylint: disable=invalid-name,redefined-outer-name,unused-variable
|
||||
test_cooling_obj.cpu_max_temp = sensors.cpu_max_temp()
|
||||
state.ost.post_response(
|
||||
ost_build_report(state.cpu, 'CPU'),
|
||||
color='Diags FAIL' if state.cpu.any_test_failed() else 'Diags',
|
||||
|
|
@ -1414,7 +1413,9 @@ def ost_update_checkboxes(state):
|
|||
|
||||
# CPU max temp and pass/fail
|
||||
if any(cpu_tests_enabled):
|
||||
state.ost.set_cpu_max_temp(CPU_MAX_TEMP)
|
||||
state.ost.set_cpu_max_temp(
|
||||
state.cpu.tests['Cooling'].cpu_max_temp,
|
||||
)
|
||||
if state.cpu.any_test_failed():
|
||||
state.ost.set_flag_failed('CPU')
|
||||
elif state.cpu.all_tests_passed():
|
||||
|
|
|
|||
Loading…
Reference in a new issue