2 # -*- coding: UTF-8 -*-
4 ########################################################################
5 # WhisperBack - Send feedback in an encrypted mail
6 # Copyright (C) 2009-2018 Tails developers <tails@boum.org>
8 # This file is part of WhisperBack
10 # WhisperBack is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 3 of the License, or (at
13 # your option) any later version.
15 # This program is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ########################################################################
24 """Base exceptions for whisperback
28 class WhisperbackException(Exception):
29 """Base class for all exceptions raised by WhisperBack"""
32 # Used in whisperback.py
34 class MisconfigurationException(WhisperbackException
):
35 """This exception is raised when the configuartion can't be properly
39 def __init__(self
, variable
):
40 WhisperbackException
.__init
__(self
,
41 _("The %s variable was not found in any of the configuration files "
42 "/etc/whisperback/config.py, ~/.whisperback/config.py, or ./config.py")
45 # Used in encryption.py
47 class EncryptionException (WhisperbackException
):
48 """This exception is raised when GnuPG fails to encrypt the data"""