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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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