Browse Source

Fix profile hash reference

add-file-preservation 1.1.1
Drew Short 4 years ago
parent
commit
ed9abba770
  1. 4
      acm.py

4
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:

Loading…
Cancel
Save