Skip to content

Commit

Permalink
Remove explicit encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed Jun 2, 2022
1 parent 2dfcb00 commit 2a79c1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,16 @@ def generate_device_manifest(
if write_manifest_file:
device_zzz_dir = os.path.join(_CHEF_ZZZ_ROOT, device_name)
device_zzz_md5_file = os.path.join(device_zzz_dir, _CI_DEVICE_MANIFEST_NAME)
with open(device_zzz_md5_file, "w+", encoding="utf-8") as md5_file:
with open(device_zzz_md5_file, "w+") as md5_file:
md5_file.write(device_file_md5)
device_zzz_zap_sha_file = os.path.join(device_zzz_dir, _CI_ZAP_MANIFEST_NAME)
with open(device_zzz_zap_sha_file, "w+", encoding="utf-8") as zap_sha_file:
with open(device_zzz_zap_sha_file, "w+") as zap_sha_file:
zap_sha_file.write(zap_sha)
return ci_manifest


def load_cicd_config() -> Dict[str, Any]:
with open(_CICD_CONFIG_FILE_NAME, "r", encoding="utf-8") as config_file:
with open(_CICD_CONFIG_FILE_NAME) as config_file:
config = json.loads(config_file.read())
for platform_name, platform_config in config.items():
has_build_dir = "build_dir" in platform_config
Expand Down Expand Up @@ -301,7 +301,7 @@ def main(argv: Sequence[str]) -> None:
flush_print(f"ZAP VERSION MISSING {help_msg}")
exit(1)
else:
with open(device_zap_sha_file, "r", encoding="utf-8") as zap_file:
with open(device_zap_sha_file) as zap_file:
output_cached_zap_sha = zap_file.read()
if output_cached_zap_sha != current_zap:
flush_print(f"ZAP VERSION MISMATCH {help_msg}")
Expand All @@ -310,7 +310,7 @@ def main(argv: Sequence[str]) -> None:
flush_print(f"INPUT MD5 MISSING {help_msg}")
exit(1)
else:
with open(device_md5_file, "r", encoding="utf-8") as md5_file:
with open(device_md5_file) as md5_file:
output_cached_md5 = md5_file.read()
if output_cached_md5 != device_md5:
flush_print(f"INPUT MD5 MISMATCH {help_msg}")
Expand Down

0 comments on commit 2a79c1c

Please sign in to comment.