From a057fdc8e32c39230e18e4396c0d5832fcd8689b Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sat, 9 Jan 1999 05:57:17 +0000 Subject: ChangeOptions(): In `subscribees' section, ValidateEmail() now handles catching blank lines, so we can (mostly) get rid of the special treatment here. --- Mailman/Cgi/admin.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index 13a1b811c..438e361c1 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -779,15 +779,6 @@ def ChangeOptions(lst, category, cgi_info, document): if not lst.nondigestable: digest = 1 try: - # catches blank lines or whitespace-only lines in mass - # subscribe dialog - if not new_name: - # TBD: we raise the exception here instead of just - # appending to subscribe_errors and doing a continue, - # because as of Python 1.5.2, this is not supported syntax - # (a continue inside the try inside a loop). - new_name = '<blank line>' - raise Errors.MMBadEmailError Utils.ValidateEmail(new_name) lst.ApprovedAddMember( new_name, @@ -797,6 +788,8 @@ def ChangeOptions(lst, category, cgi_info, document): except Errors.MMAlreadyAMember: subscribe_errors.append((new_name, 'Already a member')) except Errors.MMBadEmailError: + if new_name == '': + new_name = '<blank line>' subscribe_errors.append( (new_name, "Bad/Invalid email address")) except Errors.MMHostileAddress: -- cgit v1.3.1