Skip to content
Snippets Groups Projects
Commit 1722ad0d authored by nimrod's avatar nimrod
Browse files

Fix for not_in_use.

An image can be used by multiple containers and thus the loop will try
to remove the image from the list multiple times.
parent 775390f4
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ def not_in_use(client, images, verbose):
for Id in in_use_images: # noqa: N806
if verbose:
print(f"Image {Id} is in use, ignoring.")
if Id in not_in_use_images:
not_in_use_images.pop(Id)
return not_in_use_images
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment