Skip to content

Commit 40794a6

Browse files
Ruff
1 parent 1f7a55f commit 40794a6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

installation_and_upgrade/ibex_install_utils/tasks/server_tasks.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,20 @@ def setup_log_rotation(self) -> None:
737737
@task("Update journal parser")
738738
def update_journal_parser(self) -> None:
739739
"""Update journal parser binaries."""
740+
741+
def copy_overwrite_readonly(src: str, dst: str) -> None:
742+
import stat
743+
744+
os.chmod(dst, stat.S_IWRITE)
745+
shutil.copy2(src, dst)
746+
740747
jp_bin_dir = os.path.join(
741748
EPICS_PATH, "ISIS", "JournalParser", "master", "bin", "windows-x64"
742749
)
743750
if os.path.isdir(jp_bin_dir):
744-
shutil.copytree(jp_bin_dir, LABVIEW_DAE_DIR)
751+
shutil.copytree(
752+
jp_bin_dir,
753+
LABVIEW_DAE_DIR,
754+
copy_function=copy_overwrite_readonly,
755+
dirs_exist_ok=True,
756+
)

0 commit comments

Comments
 (0)