mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 18:53:12 +00:00
Refactoring for easier to read
This commit is contained in:
committed by
Matt Clay
parent
7cafbb5f05
commit
be9cddbddf
@@ -302,9 +302,7 @@ def is_walrus(s3_url):
|
||||
def get_md5_digest(local_file):
|
||||
md5 = hashlib.md5()
|
||||
with open(local_file, 'rb') as f:
|
||||
while True:
|
||||
data = f.read(1024 ** 2)
|
||||
if not data: break
|
||||
for data in f.read(1024 ** 2):
|
||||
md5.update(data)
|
||||
return md5.hexdigest()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user