Skip to content

Commit 5670fc0

Browse files
authored
Merge pull request #1339 from benoitf/ignore-none
fix: ignore <none>:<none> images
2 parents c4f7aaa + d43b715 commit 5670fc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ramalama/oci.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ def list_models(args):
101101
return []
102102

103103
models = json.loads("[" + output[:-1] + "]")
104+
# exclude dangling images having no tag (i.e. <none>:<none>)
105+
models = [model for model in models if model["name"] != "oci://<none>:<none>"]
106+
104107
# Grab the size from the inspect command
105108
if conman == "docker":
106109
# grab the size from the inspect command

0 commit comments

Comments
 (0)