From df929b2e1426c3a654e1d371f6d7745ae668a9ce Mon Sep 17 00:00:00 2001 From: Austin Bozowski Date: Fri, 10 Jun 2022 07:37:49 +0000 Subject: [PATCH] Minor --- examples/chef/chef.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 17f45ff3779a2d..7d1a843fa18033 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -455,7 +455,7 @@ def main(argv: Sequence[str]) -> None: "zap-generated") os.makedirs(device_out_dir) command = f"""\ - {_REPO_BASE_PATH}/scripts/tools/zap/generate.py \ + {_REPO_BASE_PATH}/scripts/tools/zap/generate.py {_CHEF_SCRIPT_PATH}/devices/{device_name}.zap -o {device_out_dir}""" shell.run_cmd(unwrap_cmd(command)) shell.run_cmd(f"touch {device_out_dir}/af-gen-event.h") @@ -497,6 +497,8 @@ def main(argv: Sequence[str]) -> None: archive_name = f"{label}-{device_name}" archive_full_name = archive_prefix + archive_name + archive_suffix flush_print(f"Adding build output to archive {archive_full_name}") + if os.path.exists(archive_full_name): + os.remove(archive_full_name) with tarfile.open(archive_full_name, "w:gz") as tar: tar.add(_CD_STAGING_DIR, arcname=".") exit(0)