From 1c16808d1c1826808d9ac705ee531bcf8b8c6be9 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 22 Jan 2023 09:54:27 +0100 Subject: exceptions: Verify excs to subclasses of OpenPGPVerificationFailure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- gemato/exceptions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gemato/exceptions.py b/gemato/exceptions.py index 51b9763..cf9208e 100644 --- a/gemato/exceptions.py +++ b/gemato/exceptions.py @@ -1,5 +1,5 @@ # gemato: exceptions -# (c) 2017-2022 Michał Górny +# (c) 2017-2023 Michał Górny # Licensed under the terms of 2-clause BSD license class GematoException(Exception): @@ -163,7 +163,7 @@ class OpenPGPVerificationFailure(OpenPGPRuntimeError): return f'OpenPGP verification failed:\n{self.output}' -class OpenPGPExpiredKeyFailure(OpenPGPRuntimeError): +class OpenPGPExpiredKeyFailure(OpenPGPVerificationFailure): """ OpenPGP verification rejected because of expired key. """ @@ -173,7 +173,7 @@ class OpenPGPExpiredKeyFailure(OpenPGPRuntimeError): f'{self.output}') -class OpenPGPRevokedKeyFailure(OpenPGPRuntimeError): +class OpenPGPRevokedKeyFailure(OpenPGPVerificationFailure): """ OpenPGP verification rejected because of revoked key. """ @@ -183,7 +183,7 @@ class OpenPGPRevokedKeyFailure(OpenPGPRuntimeError): f'{self.output}') -class OpenPGPUnknownSigFailure(OpenPGPRuntimeError): +class OpenPGPUnknownSigFailure(OpenPGPVerificationFailure): """ OpenPGP verification rejected for unknown reason (i.e. unrecognized GPG status). @@ -194,7 +194,7 @@ class OpenPGPUnknownSigFailure(OpenPGPRuntimeError): f'{self.output}') -class OpenPGPUntrustedSigFailure(OpenPGPRuntimeError): +class OpenPGPUntrustedSigFailure(OpenPGPVerificationFailure): """OpenPGP verification failed due to untrusted signing key""" def __str__(self): -- cgit v1.2.3