Reimplementation (#1)

* refactor into separate modules

* update README
This commit is contained in:
ulinja
2022-08-01 12:23:41 +02:00
committed by GitHub
parent 5665759667
commit b69fd8cfa9
25 changed files with 1274 additions and 1323 deletions

37
gpg/exceptions.py Normal file
View File

@@ -0,0 +1,37 @@
"""Exceptions which may be raised during execution of gpg wrapper functions."""
class GpgProgrammingException(Exception):
"""A general exception indicating a programming error."""
pass
class GpgRuntimeError(RuntimeError):
"""A general exception indicating a runtime error."""
pass
class UnexpectedOutputException(GpgProgrammingException):
"""Raised when a gpg subprocess produces unexpected output."""
pass
class MissingLocalKeyError(GpgRuntimeError):
"""Raised when an expected key is missing from the local keystore."""
pass
class InvalidSignatureError(GpgRuntimeError):
"""Raised when an invalid gpg signature is encountered."""
pass
class VerificationFailedError(GpgRuntimeError):
"""Raised when a gpg verfication encounters a bad signature."""
pass