diff options
| author | bwarsaw | 2001-10-09 23:16:30 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-09 23:16:30 +0000 |
| commit | 28c68a0336e9fb78dfa06e92cba87c6a917032e6 (patch) | |
| tree | 5f596a54734b603c61e4b7d5e5ba3c2cb33f6e8e | |
| parent | 5729561c6b1e9128013eb0330d6eeb3a74bcac7f (diff) | |
| download | mailman-28c68a0336e9fb78dfa06e92cba87c6a917032e6.tar.gz mailman-28c68a0336e9fb78dfa06e92cba87c6a917032e6.tar.zst mailman-28c68a0336e9fb78dfa06e92cba87c6a917032e6.zip | |
RejectUrgentMessage: Remove this since the base class, RejectMessage,
is fine for our needs.
process(): Raise RejectMessage instead, and use the rejection text as
the value of the exception.
| -rw-r--r-- | Mailman/Handlers/CalcRecips.py | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/Mailman/Handlers/CalcRecips.py b/Mailman/Handlers/CalcRecips.py index 4c925c810..b8a53c209 100644 --- a/Mailman/Handlers/CalcRecips.py +++ b/Mailman/Handlers/CalcRecips.py @@ -31,27 +31,6 @@ from Mailman.Logging.Syslog import syslog -class RejectUrgentMessage(Errors.RejectMessage): - def __init__(self, mlist, msg): - self._realname = mlist.real_name - self._subject = msg['subject'] or _('(no subject)') - - def subject(self): - return _('Your urgent message was rejected') - - def details(self): - # Do it this way for i18n. - realname = self._realname - subject = self._subject - txt = _("""\ -Your urgent message to the %(realname)s mailing list was not authorized for -delivery. The original message as received by Mailman is attached. - -""") - return Utils.wrap(txt) - - - def process(mlist, msg, msgdata): # Short circuit if we've already calculated the recipients list, # regardless of whether the list is empty or not. @@ -84,7 +63,11 @@ def process(mlist, msg, msgdata): # Bad Urgent: password, so reject it instead of passing it on. I # think it's better that the sender know they screwed up than to # deliver it normally. - raise RejectUrgentMessage(mlist, msg) + text = _("""\ +Your urgent message to the %(realname)s mailing list was not authorized for +delivery. The original message as received by Mailman is attached. +""") + raise Errors.RejectMessage, Utils.wrap(text) # Calculate the regular recipients of the message recips = [mlist.getMemberCPAddress(m) for m in mlist.getRegularMemberKeys() |
