summaryrefslogtreecommitdiff
path: root/Mailman/Errors.py
diff options
context:
space:
mode:
authorbwarsaw2001-09-04 21:03:12 +0000
committerbwarsaw2001-09-04 21:03:12 +0000
commitf6b15252993959e26fbeebc7e800a5221bf1abb0 (patch)
tree21a9b4af8824dec7629e24833e00c748a98a059f /Mailman/Errors.py
parentde688105eecfe0c08ee06bb2276d250d4224f0d9 (diff)
downloadmailman-f6b15252993959e26fbeebc7e800a5221bf1abb0.tar.gz
mailman-f6b15252993959e26fbeebc7e800a5221bf1abb0.tar.zst
mailman-f6b15252993959e26fbeebc7e800a5221bf1abb0.zip
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.
Diffstat (limited to 'Mailman/Errors.py')
-rw-r--r--Mailman/Errors.py10
1 files 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"""