From 0f2e67298f9a54bc936be327c56b25724b36b860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Wed, 26 Feb 2025 16:22:30 +0100 Subject: [PATCH] FIXUP: Use exceptions to ease the flow --- dangerzone/updater/cli.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dangerzone/updater/cli.py b/dangerzone/updater/cli.py index 033e839..ede57d8 100644 --- a/dangerzone/updater/cli.py +++ b/dangerzone/updater/cli.py @@ -29,11 +29,10 @@ def upgrade(image: str, pubkey: str) -> None: """Upgrade the image to the latest signed version.""" manifest_digest = registry.get_manifest_digest(image) try: - is_upgraded = signatures.upgrade_container_image(image, manifest_digest, pubkey) - if is_upgraded: - click.echo(f"✅ The local image {image} has been upgraded") - click.echo(f"✅ The image has been signed with {pubkey}") - click.echo(f"✅ Signatures has been verified and stored locally") + signatures.upgrade_container_image(image, manifest_digest, pubkey) + click.echo(f"✅ The local image {image} has been upgraded") + click.echo(f"✅ The image has been signed with {pubkey}") + click.echo(f"✅ Signatures has been verified and stored locally") except errors.ImageAlreadyUpToDate as e: click.echo(f"✅ {e}")