diff --git a/app/pgp_utils.py b/app/pgp_utils.py index bc15360e..6dee55a5 100644 --- a/app/pgp_utils.py +++ b/app/pgp_utils.py @@ -21,8 +21,8 @@ class PGPException(Exception): def load_public_key(public_key: str) -> str: """Load a public key into keyring and return the fingerprint. If error, raise Exception""" - import_result = gpg.import_keys(public_key) try: + import_result = gpg.import_keys(public_key) return import_result.fingerprints[0] except Exception as e: raise PGPException("Cannot load key") from e