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

Fixes: ansible-collections/community.general#186

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/198/head
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,12 +519,12 @@ 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
return "Checksum does not match: we computed " + local_md5 + " but the repository states " + remote_md5
return "Path does not exist: " + file