From ed9abba77059cad4a58cfaa1b48bbf0b7035f74f Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 20 Apr 2020 15:28:39 -0500 Subject: [PATCH] Fix profile hash reference --- acm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acm.py b/acm.py index e55679a..ccc3e6f 100755 --- a/acm.py +++ b/acm.py @@ -166,7 +166,7 @@ def prep_s3(ctx): def get_file_sha256sum(stored_data, profile, file): stored_file_hash = stored_data['sha256sum'] - stored_profile_hash = stored_data['profileHashes'][profile] + stored_profile_hash = stored_data['profileHash'] sha256sum = hashlib.sha256() with open(file, 'rb') as f: for byte_block in iter(lambda: f.read(BUF_SIZE), b""): @@ -345,7 +345,7 @@ def check_matched_files_hashes(ctx, context, print_identity, profile, files): stored_data = json.load(file_object) stored_profile_hash, stored_file_hash, calculated_file_hash = get_file_sha256sum(stored_data, profile, file) if calculated_file_hash == stored_file_hash \ - and ctx.obj['CONFIG']['profileHashs'][profile] == stored_profile_hash: + and ctx.obj['CONFIG']['profileHashes'][profile] == stored_profile_hash: if print_identity: matching_files.append(stored_data['storedAssetIdentity']) else: