Skip to content

Commit

Permalink
OK
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed May 27, 2022
1 parent 37f91b1 commit 88b852a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def generate_device_manifest(
"""
ci_manifest = {}
for device_name in _DEVICE_LIST:
device_file_path = os.path.join(_DEVICE_FOLDER, device_dir_item)
device_file_path = os.path.join(_DEVICE_FOLDER, device_name)
with open(device_file_path, "rb") as device_file:
device_file_data = device_file.read()
device_file_md5 = hashlib.md5(device_file_data).hexdigest()
Expand Down Expand Up @@ -248,11 +248,17 @@ def main(argv: Sequence[str]) -> None:
#

if options.validate_zzz:
fix_instructions = "Cached files out of date. Please bootstrap, activate, install zap, run chef with the flag --generate_zzz and commit /examples/chef/zzz_generated and /examples/chef/cimanifes.json. Ensure you are running with the latest version of ZAP from master"
fix_instructions = """Cached files out of date!
Please:
bootstrap, activate, and install zap
run chef with the flag --generate_zzz
git add examples/chef/zzz_generated
git add examples/chef/cimanifes.json
Ensure you are running with the latest version of ZAP from master!"""
ci_manifest = generate_device_manifest(_DEVICE_FOLDER)
with open(_CI_MANIFEST_FILE_NAME, "r", encoding="utf-8") as ci_manifest_file:
cached_manifest = json.loads(ci_manifest_file.read())
for device in _CI_MANIFEST:
for device in ci_manifest:
if device != "zap_commit":
try:
if cached_manifest[device] != ci_manifest[device]:
Expand Down

0 comments on commit 88b852a

Please sign in to comment.