diff --git a/sw/host/provisioning/orchestrator/src/ot_dut.py b/sw/host/provisioning/orchestrator/src/ot_dut.py index 69af13da32317..6486596e4d6b7 100644 --- a/sw/host/provisioning/orchestrator/src/ot_dut.py +++ b/sw/host/provisioning/orchestrator/src/ot_dut.py @@ -6,6 +6,7 @@ import logging import os import re +import shutil import tempfile from dataclasses import dataclass @@ -156,8 +157,8 @@ def run_cp(self) -> None: self.device_id.update_base_id(cp_device_id) self._make_log_dir() - os.rename(stdout_logfile, f"{self.log_dir}/cp_out.log.txt") - os.rename(stderr_logfile, f"{self.log_dir}/cp_err.log.txt") + shutil.move(stdout_logfile, f"{self.log_dir}/cp_out.log.txt") + shutil.move(stderr_logfile, f"{self.log_dir}/cp_err.log.txt") self.cp_data = chip_probe_data logging.info(f"CP logs saved to {self.log_dir}.")