From 88b852a63a8ccc41d66614e462e955696fda8104 Mon Sep 17 00:00:00 2001 From: Austin Bozowski Date: Fri, 27 May 2022 20:56:58 +0000 Subject: [PATCH] OK --- examples/chef/chef.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 7bbfd4c55e17a1..26ad9a7865a105 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -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() @@ -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]: