mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Bugfix for gc_storage and s3
Make keysum return None if not key_check (this case wasn't covered).
This commit is contained in:
parent
e6ab2d83b8
commit
d89d2432fd
2 changed files with 12 additions and 10 deletions
library/cloud
|
@ -152,7 +152,8 @@ def key_check(module, gs, bucket, obj):
|
|||
def keysum(module, gs, bucket, obj):
|
||||
bucket = gs.lookup(bucket)
|
||||
key_check = bucket.get_key(obj)
|
||||
if key_check:
|
||||
if not key_check:
|
||||
return None
|
||||
md5_remote = key_check.etag[1:-1]
|
||||
etag_multipart = '-' in md5_remote # Check for multipart, etag is not md5
|
||||
if etag_multipart is True:
|
||||
|
|
|
@ -145,7 +145,8 @@ def key_check(module, s3, bucket, obj):
|
|||
def keysum(module, s3, bucket, obj):
|
||||
bucket = s3.lookup(bucket)
|
||||
key_check = bucket.get_key(obj)
|
||||
if key_check:
|
||||
if not key_check:
|
||||
return None
|
||||
md5_remote = key_check.etag[1:-1]
|
||||
etag_multipart = '-' in md5_remote # Check for multipart, etag is not md5
|
||||
if etag_multipart is True:
|
||||
|
|
Loading…
Add table
Reference in a new issue