mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
E501 fixes (#22879)
This commit is contained in:
parent
4fdeade389
commit
3164e8b561
215 changed files with 1328 additions and 761 deletions
|
@ -245,7 +245,10 @@ class MavenDownloader:
|
|||
timestamp = xml.xpath("/metadata/versioning/snapshot/timestamp/text()")[0]
|
||||
buildNumber = xml.xpath("/metadata/versioning/snapshot/buildNumber/text()")[0]
|
||||
for snapshotArtifact in xml.xpath("/metadata/versioning/snapshotVersions/snapshotVersion"):
|
||||
if len(snapshotArtifact.xpath("classifier/text()")) > 0 and snapshotArtifact.xpath("classifier/text()")[0] == artifact.classifier and len(snapshotArtifact.xpath("extension/text()")) > 0 and snapshotArtifact.xpath("extension/text()")[0] == artifact.extension:
|
||||
if (len(snapshotArtifact.xpath("classifier/text()")) > 0 and
|
||||
snapshotArtifact.xpath("classifier/text()")[0] == artifact.classifier and
|
||||
len(snapshotArtifact.xpath("extension/text()")) > 0 and
|
||||
snapshotArtifact.xpath("extension/text()")[0] == artifact.extension):
|
||||
return self._uri_for_artifact(artifact, snapshotArtifact.xpath("value/text()")[0])
|
||||
return self._uri_for_artifact(artifact, artifact.version.replace("SNAPSHOT", timestamp + "-" + buildNumber))
|
||||
|
||||
|
@ -412,7 +415,8 @@ def main():
|
|||
|
||||
try:
|
||||
if downloader.download(artifact, dest):
|
||||
module.exit_json(state=state, dest=dest, group_id=group_id, artifact_id=artifact_id, version=version, classifier=classifier, extension=extension, repository_url=repository_url, changed=True)
|
||||
module.exit_json(state=state, dest=dest, group_id=group_id, artifact_id=artifact_id, version=version, classifier=classifier,
|
||||
extension=extension, repository_url=repository_url, changed=True)
|
||||
else:
|
||||
module.fail_json(msg="Unable to download the artifact")
|
||||
except ValueError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue