WrongPasswordError: display docstring in str()

This commit is contained in:
Brian Warner 2016-04-25 18:16:08 -07:00
parent 1511f96c66
commit a181a3fb35

View File

@ -1,4 +1,4 @@
import functools
import functools, textwrap
class ServerError(Exception):
def __init__(self, message, relay):
@ -28,6 +28,8 @@ class WrongPasswordError(Exception):
chance.
"""
# or the data blob was corrupted, and that's why decrypt failed
def __init__(self):
Exception.__init__(self, textwrap.dedent(self.__doc__.strip()))
class ReflectionAttack(Exception):
"""An attacker (or bug) reflected our outgoing message back to us."""