Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Oct 19, 2024
1 parent 05638b4 commit 0d36628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/otaclient/boot_control/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def _store_standby_status(self, _status: api_types.StatusOta):

def _load_current_status(self) -> Optional[api_types.StatusOta]:
if _status_str := read_str_from_file(
self.current_ota_status_dir / cfg.OTA_STATUS_FNAME
self.current_ota_status_dir / cfg.OTA_STATUS_FNAME, _default=""
).upper():
with contextlib.suppress(KeyError):
# invalid status string
Expand Down Expand Up @@ -789,4 +789,4 @@ def umount_all(self, *, ignore_error: bool = True):


def cat_proc_cmdline(target: str = "/proc/cmdline") -> str:
return read_str_from_file(target)
return read_str_from_file(target, _default="")

0 comments on commit 0d36628

Please sign in to comment.