From ba09e78c6de4444aa68184bcaecf82a0ea0593d4 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sun, 6 Oct 2002 01:35:57 +0000 Subject: main(): Catch BadListNameError's that can get raised if the proposed list name is invalid. --- bin/newlist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/newlist b/bin/newlist index 66780aedd..240af114e 100755 --- a/bin/newlist +++ b/bin/newlist @@ -156,8 +156,10 @@ def main(): mlist.Create(listname, owner_mail, pw) finally: os.umask(oldmask) - except Errors.MMBadEmailError: - usage(1, _('Bad owner email address: %(owner_mail)s')) + except Errors.BadListNameError, s: + usage(1, _('Illegal list name: %(s)s')) + except Errors.MMBadEmailError, s: + usage(1, _('Bad owner email address: %(s)s')) except Errors.MMListAlreadyExistsError: usage(1, _('List already exists: %(listname)s')) -- cgit v1.3.1