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:
parent
406d3250c4
commit
2639d4c023
2 changed files with 5 additions and 3 deletions
2
changelogs/fragments/186-maven_artifact.yml
Normal file
2
changelogs/fragments/186-maven_artifact.yml
Normal 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).
|
|
@ -519,12 +519,12 @@ class MavenDownloader:
|
||||||
remote_md5 = _remote_md5
|
remote_md5 = _remote_md5
|
||||||
# remote_md5 is empty so we continue and keep original md5 string
|
# remote_md5 is empty so we continue and keep original md5 string
|
||||||
# This should not happen since we check for remote_md5 before
|
# This should not happen since we check for remote_md5 before
|
||||||
except IndexError as e:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
if local_md5 == remote_md5:
|
if local_md5.lower() == remote_md5.lower():
|
||||||
return None
|
return None
|
||||||
else:
|
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
|
return "Path does not exist: " + file
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue