Skip to content

Commit

Permalink
ota_core.OTAClient: refine the OTA request reject msg on otaclient no…
Browse files Browse the repository at this point in the history
…t started
  • Loading branch information
Bodong-Yang committed Dec 25, 2024
1 parent a06972a commit 5f00866
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/otaclient/ota_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@
)
from otaclient._utils import SharedOTAClientStatusWriter, get_traceback, wait_and_log
from otaclient.boot_control import BootControllerProtocol, get_boot_controller
from otaclient.configs.cfg import cfg, ecu_info, proxy_info
from otaclient.configs.cfg import (
ECU_INFO_LOADED_SUCCESSFULLY,
cfg,
ecu_info,
proxy_info,
)
from otaclient.create_standby import (
StandbySlotCreatorProtocol,
get_standby_slot_creator,
Expand Down Expand Up @@ -864,9 +869,10 @@ def main(
)

elif not self.started:
_err_msg = (
"otaclient is not started, might be due to broken ecu_info.yaml"
)
_err_msg = "reject OTA request due to otaclient is not (yet) started."
if not ECU_INFO_LOADED_SUCCESSFULLY:
_err_msg = f"reject OTA request due to {cfg.ECU_INFO_FPATH} missing or broken"

logger.error(_err_msg)
resp_queue.put_nowait(
IPCResponse(
Expand Down

0 comments on commit 5f00866

Please sign in to comment.