Skip to content

Commit ef86b53

Browse files
committed
Fix startswith Attribute error
1 parent 8a630bb commit ef86b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/determine-reboot-cause

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def determine_reboot_cause():
184184
# the software_reboot_cause will be treated as the reboot cause if it's not unknown
185185
# otherwise, the cmdline_reboot_cause will be treated as the reboot cause if it's not none
186186
# Else the software_reboot_cause will be treated as the reboot cause
187-
if not hardware_reboot_cause.startswith(REBOOT_CAUSE_NON_HARDWARE):
187+
if REBOOT_CAUSE_NON_HARDWARE not in hardware_reboot_cause:
188188
previous_reboot_cause = hardware_reboot_cause
189189
# Check if any software reboot was issued before this hardware reboot happened
190190
if software_reboot_cause is not REBOOT_CAUSE_UNKNOWN:

0 commit comments

Comments
 (0)