Skip to content

Commit

Permalink
remove the empty bracket if no hardware reboot cause minor
Browse files Browse the repository at this point in the history
  • Loading branch information
sujinmkang committed Aug 18, 2022
1 parent e47d831 commit 0dcc7fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/determine-reboot-cause
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ def find_hardware_reboot_cause():
else:
sonic_logger.log_info("No reboot cause found from platform api")

hardware_reboot_cause = "{} ({})".format(hardware_reboot_cause_major, hardware_reboot_cause_minor)
hardware_reboot_cause_minor_str = ""
if hardware_reboot_cause_minor:
hardware_reboot_cause_minor_str = " ({})".format(hardware_reboot_cause_minor)

hardware_reboot_cause = hardware_reboot_cause_major + hardware_reboot_cause_minor_str

return hardware_reboot_cause


Expand Down

0 comments on commit 0dcc7fe

Please sign in to comment.