diff options
| author | bwarsaw | 1998-06-23 23:04:22 +0000 |
|---|---|---|
| committer | bwarsaw | 1998-06-23 23:04:22 +0000 |
| commit | cc78697e4f617d7e8b6c9410114fef96b39e63d8 (patch) | |
| tree | dcd673d862556ef4dc3b603729e3daf34f3151cd /Mailman/MailCommandHandler.py | |
| parent | 87a54f11a1605be2a1792bdbed5d0a51c0bf2cd4 (diff) | |
| download | mailman-cc78697e4f617d7e8b6c9410114fef96b39e63d8.tar.gz mailman-cc78697e4f617d7e8b6c9410114fef96b39e63d8.tar.zst mailman-cc78697e4f617d7e8b6c9410114fef96b39e63d8.zip | |
MailCommandHandler.AddApprovalMsg(): use the Utils.maketext()
interface.
MailCommandHandler.ProcessConfirmCmd(): Near the bottom of the method,
where self.AddRequest() is called on a closed list, wrap the call in a
try/except so as to catch the MMNeedApproval exception that gets
raised.
John, please verify that I'm doing this right.
Diffstat (limited to 'Mailman/MailCommandHandler.py')
| -rw-r--r-- | Mailman/MailCommandHandler.py | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index 83514369e..21cd992a3 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -494,30 +494,23 @@ class MailCommandHandler: self.ApprovedAddMember(email_addr, password, digest) self.AddToResponse("Succeeded") else: - self.AddRequest('add_member', digest, email_addr, password) + try: + self.AddRequest('add_member', digest, email_addr, password) + except Errors.MMNeedApproval: + self.AddApprovalMsg('add_member') del pending[cookie] Pending.set_pending(pending) def AddApprovalMsg(self, cmd): - # XXX: convert to templates/*.txt style - self.AddError('''Your request to %s: - - %s - -has been forwarded to the person running the list. - -This is probably because you are trying to subscribe to a 'closed' list. - -You will receive email notification of the list owner's decision about -your subscription request. - -Any questions about the list owner's policy should be directed to: - - %s - -''' % (self.GetRequestEmail(), cmd, self.GetAdminEmail())) + text = Utils.maketext( + 'approve.txt', + {'requestaddr': self.GetRequestEmail(), + 'cmd' : cmd, + 'adminaddr' : self.GetAdminEmail(), + }) + self.AddError(text) def ProcessHelpCmd(self, args, cmd, mail): |
