1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

maven_artifact: Convert MD5 values to lowercase before comparison (#197)

Fixes: ansible-collections/community.general#186

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2020-04-17 11:54:34 +05:30 committed by GitHub
parent 406d3250c4
commit 2639d4c023
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- Convert MD5SUM to lowercase before comparison in maven_artifact module (https://github.com/ansible-collections/community.general/issues/186).

View file

@ -519,9 +519,9 @@ class MavenDownloader:
remote_md5 = _remote_md5
# remote_md5 is empty so we continue and keep original md5 string
# This should not happen since we check for remote_md5 before
except IndexError as e:
except IndexError:
pass
if local_md5 == remote_md5:
if local_md5.lower() == remote_md5.lower():
return None
else:
return "Checksum does not match: we computed " + local_md5 + " but the repository states " + remote_md5