From 65694684b15450a7fdf68f12e58b1d02411b9cee Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 20 Apr 2020 18:16:51 -0500 Subject: [PATCH] Address python else if issue --- acm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/acm.py b/acm.py index f82ff93..c1363ec 100755 --- a/acm.py +++ b/acm.py @@ -309,10 +309,11 @@ def list_files(ctx, context, sha256sum, suffix, print_identity): file = file.strip() if sha256sum: - stat = s3.stat_object(s3_bucket, obj) - sha256sum_value = stat.metadata[get_metadata_name("SHA256SUM")] + file_object = s3.get_object(s3_bucket, obj) + stored_data = json.load(file_object) + sha256sum_value = stored_data['sha256sum'] file = f'{sha256sum_value} {file}' - else if print_identity: + elif print_identity: file_object = s3.get_object(s3_bucket, obj) stored_data = json.load(file_object) found_files.append(stored_data['storedAssetIdentity'])