Skip to content

Commit e119b69

Browse files
Remove TODO comments which are no longer needed (#325)
Description Remove TODO comments which are no longer needed Motivation and Context Remove TODO comments which are no longer needed How Has This Been Tested? Only comment change
1 parent 9657a26 commit e119b69

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

sonic-thermalctld/scripts/thermalctld

+5-7
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,6 @@ class FanUpdater(logger.Logger):
360360
format(fan_name, speed_target, speed, speed_tolerance)
361361
)
362362

363-
# TODO: handle invalid fan direction
364-
365363
# We don't set PSU led here, PSU led will be handled in psud
366364
if set_led:
367365
if not is_psu_fan:
@@ -401,8 +399,8 @@ class FanUpdater(logger.Logger):
401399
fan_drawer.set_status_led(led_color)
402400
except NotImplementedError as e:
403401
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
406404
# print the warning log again and again. But if there is other exception, we could not
407405
# reach this line, and it will retry setting led color in the next run.
408406
fan_status.led_initialized = True
@@ -613,7 +611,7 @@ class TemperatureUpdater(logger.Logger):
613611
available_thermals = set()
614612
for module_index, module in enumerate(self.chassis.get_all_modules()):
615613
module_name = try_get(module.get_name, 'Module {}'.format(module_index + 1))
616-
614+
617615
for thermal_index, thermal in enumerate(module.get_all_thermals()):
618616
if self.task_stopping_event.is_set():
619617
return
@@ -639,12 +637,12 @@ class TemperatureUpdater(logger.Logger):
639637
available_thermals.add((thermal, psu_name, thermal_index))
640638
self._refresh_temperature_status(psu_name, thermal, thermal_index)
641639

642-
640+
643641
thermals_to_remove = self.module_thermals - available_thermals
644642
self.module_thermals = available_thermals
645643
for thermal, parent_name, thermal_index in thermals_to_remove:
646644
self._remove_thermal_from_db(thermal, parent_name, thermal_index)
647-
645+
648646
self.log_debug("End temperature updating")
649647

650648
def _refresh_temperature_status(self, parent_name, thermal, thermal_index):

sonic-xcvrd/tests/test_xcvrd.py

-3
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,6 @@ def test_DaemonXcvrd_run(self, mock_task_stop1, mock_task_stop2, mock_task_run1,
491491
xcvrd = DaemonXcvrd(SYSLOG_IDENTIFIER)
492492
xcvrd.stop_event.wait = MagicMock()
493493
xcvrd.run()
494-
# TODO: more check
495494
assert mock_task_stop1.call_count == 1
496495
assert mock_task_stop2.call_count == 1
497496
assert mock_task_run1.call_count == 1
@@ -1317,8 +1316,6 @@ def test_DaemonXcvrd_init_deinit(self):
13171316
xcvrd = DaemonXcvrd(SYSLOG_IDENTIFIER)
13181317
xcvrd.init()
13191318
xcvrd.deinit()
1320-
# TODO: fow now we only simply call xcvrd.init/deinit without any further check, it only makes sure that
1321-
# xcvrd.init/deinit will not raise unexpected exception. In future, probably more check will be added
13221319

13231320

13241321
def wait_until(total_wait_time, interval, call_back, *args, **kwargs):

0 commit comments

Comments
 (0)