Merge pull request #141 from firstlookmedia/137-docker-exception

Ignore exceptions when there's an error deleting an old container image
This commit is contained in:
Micah Lee 2021-12-13 11:37:44 -08:00 committed by GitHub
commit 2206df0422
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -482,11 +482,14 @@ class GlobalCommon(object):
elif found_image_id == "": elif found_image_id == "":
pass pass
else: else:
print(f"Deleting old dangerzone container image") print("Deleting old dangerzone container image")
subprocess.check_output( try:
[self.get_container_runtime(), "rmi", "--force", found_image_id], subprocess.check_output(
startupinfo=self.get_subprocess_startupinfo(), [self.get_container_runtime(), "rmi", "--force", found_image_id],
) startupinfo=self.get_subprocess_startupinfo(),
)
except:
print("Couldn't delete old container image, so leaving it there")
return installed return installed