summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Verna <cverna@tutanota.com>2019-06-04 13:12:39 +0200
committerClement Verna <cverna@tutanota.com>2019-06-04 13:12:39 +0200
commit8093e55cdd9b2fa82167c2d25e2a494f6cea854a (patch)
treee91678bc96f0ef7ba2eb7df29d4f7f39ba86d0aa
parent6760916870304c2702ece9f1c0d88177f56e46c2 (diff)
downloadansible-8093e55cdd9b2fa82167c2d25e2a494f6cea854a.zip
ansible-8093e55cdd9b2fa82167c2d25e2a494f6cea854a.tar.gz
ansible-8093e55cdd9b2fa82167c2d25e2a494f6cea854a.tar.xz
delete_old_oci_images: fix formating of the script
Signed-off-by: Clement Verna <cverna@tutanota.com>
-rw-r--r--library/delete_old_oci_images.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/library/delete_old_oci_images.py b/library/delete_old_oci_images.py
index cb5cd16..26bfbf9 100644
--- a/library/delete_old_oci_images.py
+++ b/library/delete_old_oci_images.py
@@ -101,8 +101,7 @@ def main():
resp = s.get("{}/v2/_catalog?n=500".format(registry))
if not resp.ok:
module.fail_json(
- msg="Failed to get the list of images on the {}".format(registry)",
- failed=True
+ msg="Failed to get the list of images on the {}".format(registry), failed=True
)
repositories = resp.json().get("repositories")
@@ -113,12 +112,11 @@ def main():
if not resp.ok:
result["stdout_lines"].append("Failed to get the list of tags for {}".format(repo))
-
image = resp.json()
# Log the repositories that don't have any tags
if image["tags"] is None:
- result["stdout_lines"].append("{repo} does not have any tags".format(repo))
- continue
+ result["stdout_lines"].append("{repo} does not have any tags".format(repo))
+ continue
# For each tag get the maninfest
for tag in image["tags"]:
resp = s.get("{}/v2/{}/manifests/{}".format(registry, repo, tag))