Skip to content

Commit

Permalink
Update chassis.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagami-Jiang committed Sep 5, 2023
1 parent 07ce321 commit 70ec1c2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def set_status_led(self, color):
if color == self.get_status_led():
return False
status, res = self.helper.ipmi_raw(GET_LED_MODE)
if status != 0 or res == "01":
if not status or res == "01":
print("SYS LED takes automatic ctrl mode!")
return False
sys_led_color_map = {
Expand All @@ -76,7 +76,9 @@ def set_status_led(self, color):
'amber_blink_1hz': '03',
'amber_blink_4hz': '04',
'green_blink_1hz': '05',
'green_blink_4hz': '06'
'green_blink_4hz': '06',
'alternate_blink_1hz': '07',
'alternate_blink_4hz': '08'
}
color_val = sys_led_color_map.get(color.lower(), None)
if color_val is None:
Expand Down

0 comments on commit 70ec1c2

Please sign in to comment.