summaryrefslogtreecommitdiff
path: root/alot/errors.py
blob: 9860f4112e4e4f595e6288f56492db018fb4aa44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (C) 2011-2012  Patrick Totzke <patricktotzke@gmail.com>
# This file is released under the GNU GPL, version 3 or a later revision.
# For further details see the COPYING file


class GPGCode(object):
    AMBIGUOUS_NAME = 1
    NOT_FOUND = 2
    BAD_PASSPHRASE = 3
    KEY_REVOKED = 4
    KEY_EXPIRED = 5
    KEY_INVALID = 6
    KEY_CANNOT_ENCRYPT = 7
    KEY_CANNOT_SIGN = 8
    INVALID_HASH = 9


class GPGProblem(Exception):
    """GPG Error"""
    def __init__(self, message, code):
        self.code = code
        super(GPGProblem, self).__init__(message)


class CompletionError(Exception):
    pass