mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00: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:
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 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user