mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix maven_artifact md5 checksum check with archiva repository (#43250)
This commit is contained in:
parent
2822fd8d9b
commit
eee406dfd2
1 changed files with 8 additions and 0 deletions
|
@ -434,6 +434,14 @@ class MavenDownloader:
|
|||
return "Cannot retrieve a valid md5 from %s: %s" % (remote_url, to_native(e))
|
||||
if(not remote_md5):
|
||||
return "Cannot find md5 from " + remote_url
|
||||
try:
|
||||
# Check if remote md5 only contains md5 or md5 + filename
|
||||
_remote_md5 = remote_md5.split(None)[0]
|
||||
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:
|
||||
pass
|
||||
if local_md5 == remote_md5:
|
||||
return None
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue