Fix maven_artifact md5 checksum check with archiva repository (#43250)

This commit is contained in:
bonzi316 2018-08-31 05:32:37 -04:00 committed by ansibot
parent 2822fd8d9b
commit eee406dfd2

View file

@ -434,6 +434,14 @@ class MavenDownloader:
return "Cannot retrieve a valid md5 from %s: %s" % (remote_url, to_native(e)) return "Cannot retrieve a valid md5 from %s: %s" % (remote_url, to_native(e))
if(not remote_md5): if(not remote_md5):
return "Cannot find md5 from " + remote_url 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: if local_md5 == remote_md5:
return None return None
else: else: