summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-10-15 20:45:27 +0000
committerbwarsaw2001-10-15 20:45:27 +0000
commit72865134b1195d1e4b7a56e8987ea0b320cea8f5 (patch)
tree6bb46e3c91b41e1971f4a94d7bf19e422c846bab
parentbc1e21d2b422e856290ac1965255ca8e6939bbdb (diff)
downloadmailman-72865134b1195d1e4b7a56e8987ea0b320cea8f5.tar.gz
mailman-72865134b1195d1e4b7a56e8987ea0b320cea8f5.tar.zst
mailman-72865134b1195d1e4b7a56e8987ea0b320cea8f5.zip
-rw-r--r--Mailman/Errors.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/Mailman/Errors.py b/Mailman/Errors.py
index 155ea2b8f..b98fd15d7 100644
--- a/Mailman/Errors.py
+++ b/Mailman/Errors.py
@@ -125,9 +125,6 @@ class HoldMessage(HandlerError):
class DiscardMessage(HandlerError):
"""The message can be discarded with no further action"""
-class RejectMessage(HandlerError):
- """The message will be bounced back to the sender"""
-
class SomeRecipientsFailed(HandlerError):
"""Delivery to some or all recipients failed"""
def __init__(self, tempfailures, permfailures):
@@ -138,3 +135,13 @@ class SomeRecipientsFailed(HandlerError):
# multiple inheritance for backwards compatibility
class LoopError(DiscardMessage, MMLoopingPost):
"""We've seen this message before"""
+
+class RejectMessage(HandlerError):
+ """The message will be bounced back to the sender"""
+ def __init__(self, notice=None):
+ if notice is None:
+ notice = Mailman.i18n._('Your message was rejected')
+ self.__notice = notice
+
+ def notice(self):
+ return self.__notice