@@ -360,8 +360,6 @@ class FanUpdater(logger.Logger):
360
360
format (fan_name , speed_target , speed , speed_tolerance )
361
361
)
362
362
363
- # TODO: handle invalid fan direction
364
-
365
363
# We don't set PSU led here, PSU led will be handled in psud
366
364
if set_led :
367
365
if not is_psu_fan :
@@ -401,8 +399,8 @@ class FanUpdater(logger.Logger):
401
399
fan_drawer .set_status_led (led_color )
402
400
except NotImplementedError as e :
403
401
self .log_warning ('Failed to set status LED for fan {}, set_status_led not implemented' .format (fan_name ))
404
-
405
- # Set led_initialized to True even if there is NotImplementedError as it is not neccessary to
402
+
403
+ # Set led_initialized to True even if there is NotImplementedError as it is not neccessary to
406
404
# print the warning log again and again. But if there is other exception, we could not
407
405
# reach this line, and it will retry setting led color in the next run.
408
406
fan_status .led_initialized = True
@@ -613,7 +611,7 @@ class TemperatureUpdater(logger.Logger):
613
611
available_thermals = set ()
614
612
for module_index , module in enumerate (self .chassis .get_all_modules ()):
615
613
module_name = try_get (module .get_name , 'Module {}' .format (module_index + 1 ))
616
-
614
+
617
615
for thermal_index , thermal in enumerate (module .get_all_thermals ()):
618
616
if self .task_stopping_event .is_set ():
619
617
return
@@ -639,12 +637,12 @@ class TemperatureUpdater(logger.Logger):
639
637
available_thermals .add ((thermal , psu_name , thermal_index ))
640
638
self ._refresh_temperature_status (psu_name , thermal , thermal_index )
641
639
642
-
640
+
643
641
thermals_to_remove = self .module_thermals - available_thermals
644
642
self .module_thermals = available_thermals
645
643
for thermal , parent_name , thermal_index in thermals_to_remove :
646
644
self ._remove_thermal_from_db (thermal , parent_name , thermal_index )
647
-
645
+
648
646
self .log_debug ("End temperature updating" )
649
647
650
648
def _refresh_temperature_status (self , parent_name , thermal , thermal_index ):
0 commit comments