[reboiot-cause] Fix a broken symlink of previous-reboot-cause file removal issue (#10751)

Signed-off-by: mlok <marty.lok@nokia.com>
This commit is contained in:
Marty Y. Lok 2022-05-11 13:07:04 -04:00 committed by GitHub
parent 04175eb34a
commit dee7655526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ def main():
os.makedirs(REBOOT_CAUSE_DIR) os.makedirs(REBOOT_CAUSE_DIR)
# Remove stale PREVIOUS_REBOOT_CAUSE_FILE if it exists # Remove stale PREVIOUS_REBOOT_CAUSE_FILE if it exists
if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE): if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE) or os.path.islink(PREVIOUS_REBOOT_CAUSE_FILE):
os.remove(PREVIOUS_REBOOT_CAUSE_FILE) os.remove(PREVIOUS_REBOOT_CAUSE_FILE)
# This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides # This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides