mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix for #26995
This commit is contained in:
parent
82be9dceb6
commit
db11e1985b
@ -202,8 +202,8 @@ def _get_snapshot_url(artifactory_url, repository, group_id, artifact_id, versio
|
||||
has_classifier = classifier is not None and classifier != ""
|
||||
|
||||
if snapshot_version is None:
|
||||
try:
|
||||
snapshot_version_metadata = _get_snapshot_version_metadata(artifactory_url=artifactory_url, repository=repository, group_id=group_id, artifact_id=artifact_id, version=version, headers=headers)
|
||||
|
||||
if packaging not in snapshot_version_metadata['snapshot_versions']:
|
||||
error_message = '''Cannot find requested packaging '{packaging}' in the snapshot version metadata.
|
||||
artifactory_url: {artifactory_url}
|
||||
@ -241,6 +241,9 @@ def _get_snapshot_url(artifactory_url, repository, group_id, artifact_id, versio
|
||||
raise ArtifactoryError(error_message)
|
||||
|
||||
snapshot_version = snapshot_version_metadata['snapshot_versions'][packaging]
|
||||
except CommandExecutionError as err:
|
||||
log.error('Could not fetch maven-metadat.xml. Assuming snapshot_version=%s.', version)
|
||||
snapshot_version = version
|
||||
|
||||
group_url = __get_group_id_subpath(group_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user