From e13d3a073033ee863569cc19b7caefef705c22a6 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 15 Jun 2000 20:43:37 +0000 Subject: MessageHeld.rejection_notice(): New method which subclasses override to provide a better rejection notice suggestion in the admindb page. --- Mailman/Handlers/HandlerAPI.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Mailman/Handlers/HandlerAPI.py b/Mailman/Handlers/HandlerAPI.py index e811f2f8f..16b9b6a01 100644 --- a/Mailman/Handlers/HandlerAPI.py +++ b/Mailman/Handlers/HandlerAPI.py @@ -30,14 +30,22 @@ from Mailman.pythonlib.StringIO import StringIO class HandlerError(Errors.MailmanError): """Base class for all handler errors.""" + class MessageHeld(HandlerError): """Base class for all message-being-held short circuits.""" def __str__(self): return self.__class__.__doc__ + rejection = 'Your message was rejected' + + def rejection_notice(self, mlist): + return self.__class__.rejection + + class DiscardMessage(HandlerError): """The message can be discarded with no further action""" + class SomeRecipientsFailed(HandlerError): """Delivery to some or all recipients failed""" -- cgit v1.2.3-70-g09d2