From f6b15252993959e26fbeebc7e800a5221bf1abb0 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Tue, 4 Sep 2001 21:03:12 +0000 Subject: HoldMessage: Let's do this the non-clever way (which was causing too many problem due to docstring non-extraction in pygettext). Now the attribute `reason' is used as the reason instead of the docstring, and reason_notice() is the called interface. This mirrors exactly how rejection notices are done. HoldMessage.__str__(): Removed. --- Mailman/Errors.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Mailman/Errors.py b/Mailman/Errors.py index 3f9ee0617..155ea2b8f 100644 --- a/Mailman/Errors.py +++ b/Mailman/Errors.py @@ -109,14 +109,18 @@ class HandlerError(MailmanError): class HoldMessage(HandlerError): """Base class for all message-being-held short circuits.""" - def __str__(self): - return self.__class__.__doc__ + + # funky spelling is necessary to break import loops + reason = Mailman.i18n._('For some unknown reason') + + def reason_notice(self): + return self.reason # funky spelling is necessary to break import loops rejection = Mailman.i18n._('Your message was rejected') def rejection_notice(self, mlist): - return self.__class__.rejection + return self.rejection class DiscardMessage(HandlerError): """The message can be discarded with no further action""" -- cgit v1.2.3-70-g09d2