Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed May 27, 2022
1 parent 8ec4bd8 commit 43ed453
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,8 @@ def main(argv: Sequence[str]) -> None:
flush_print("Building all chef examples")
os.environ['GNUARMEMB_TOOLCHAIN_PATH'] = os.environ['PW_ARM_CIPD_INSTALL_DIR']
archive_prefix = "/workspace/artifacts/"
if not os.path.exists(archive_prefix):
os.mkdir(archive_prefix)
archive_suffix = ".tar.gz"
os.makedirs(archive_prefix, exist_ok=True)
for device_name in _DEVICE_LIST:
for platform, platform_meta in cicd_config.items():
directory = platform_meta['build_dir']
Expand Down Expand Up @@ -478,9 +477,11 @@ def main(argv: Sequence[str]) -> None:
if options.do_build:
if options.use_zzz:
flush_print("Using pre-generated ZAP output")
zzz_dir = os.path.join(_CHEF_SCRIPT_PATH, "zzz_generated", options.sample_device_type_name, "zap-generated")
if os.path.exists(gen_dir):
shutil.rmtree(gen_dir)
zzz_dir = os.path.join(_CHEF_SCRIPT_PATH,
"zzz_generated",
options.sample_device_type_name,
"zap-generated")
shutil.rmtree(gen_dir, ignore_errors=True)
shutil.copytree(zzz_dir, gen_dir)

flush_print("Building...")
Expand Down Expand Up @@ -538,7 +539,8 @@ def main(argv: Sequence[str]) -> None:
elif options.build_target == "linux":
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/linux")
with open(f"{_CHEF_SCRIPT_PATH}/linux/args.gni", "w") as f:
args_gni = os.path.join(_REPO_BASE_PATH, "config/standalone/args.gni")
args_gni = os.path.join(
_REPO_BASE_PATH, "config/standalone/args.gni")
f.write(textwrap.dedent(f"""\
import("//build_overrides/chip.gni")
import("{args_gni}")
Expand Down

0 comments on commit 43ed453

Please sign in to comment.