diff options
| author | bwarsaw | 2002-01-06 04:59:10 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-01-06 04:59:10 +0000 |
| commit | ebd9914db8b0d5d8ef949ebed924461137c6c04f (patch) | |
| tree | 8a76b0c0a9263daf5db090461a3f0f74ca243c69 | |
| parent | bc3ae9858e694681f9ef72be3021fe6175f3c23e (diff) | |
| download | mailman-ebd9914db8b0d5d8ef949ebed924461137c6c04f.tar.gz mailman-ebd9914db8b0d5d8ef949ebed924461137c6c04f.tar.zst mailman-ebd9914db8b0d5d8ef949ebed924461137c6c04f.zip | |
process_form(): Handle MembershipIsBanned exceptions.
| -rw-r--r-- | Mailman/Cgi/subscribe.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Mailman/Cgi/subscribe.py b/Mailman/Cgi/subscribe.py index 188dec2b6..8aead66fb 100644 --- a/Mailman/Cgi/subscribe.py +++ b/Mailman/Cgi/subscribe.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -99,6 +99,7 @@ def main(): def process_form(mlist, doc, cgidata, lang): + listowner = mlist.GetOwnerEmail() realname = mlist.real_name results = [] @@ -176,6 +177,10 @@ email which contains further instructions.""") results = '' # Check for all the errors that mlist.AddMember can throw options on the # web page for this cgi + except Errors.MembershipIsBanned: + results = _("""The email address you supplied is banned from this + mailing list. If you think this restriction is erroneous, please + contact the list owners at %(listowner)s.""") except Errors.MMBadEmailError: results = _("""\ The email address you supplied is not valid. (E.g. it must contain an @@ -214,7 +219,6 @@ moderator's decision when they get to your request.""") # This could be a membership probe. For safety, let the user know # a probe occurred. BAW: should we inform the list moderator? listaddr = mlist.GetListEmail() - listowner = mlist.GetOwnerEmail() msg = Message.UserNotification( mlist.getMemberCPAddress(email), mlist.GetAdminEmail(), |
