summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-01-22 09:54:27 +0100
committerMichał Górny <mgorny@gentoo.org>2023-01-22 09:54:27 +0100
commit1c16808d1c1826808d9ac705ee531bcf8b8c6be9 (patch)
tree37e5cb1faae904c64d1ab1a0d30af52c9b583bd9
parent39c3a6c0d9ce83becb768a545b07290e1f6002d3 (diff)
downloadgemato-1c16808d1c1826808d9ac705ee531bcf8b8c6be9.tar.gz
exceptions: Verify excs to subclasses of OpenPGPVerificationFailure
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--gemato/exceptions.py10
1 files 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):