From fb02238fd962dc66308c02da0ff90457920c41c2 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sun, 9 Apr 2000 23:23:22 +0000 Subject: main(): Use Utils.list_exists() to test for list existance. Catch MMListAlreadyExistsError in mlist.Create() -- this is probably redundant. --- bin/newlist | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/newlist b/bin/newlist index a8653d4a3..51029055e 100755 --- a/bin/newlist +++ b/bin/newlist @@ -87,7 +87,7 @@ def main(argv): if '@' in listname: usage(1, 'List name must not include "@": ' + listname) - if listname in Utils.list_names(): + if Utils.list_exists(listname): usage(1, 'List already exists: ' + listname) if len(argv) > 2: @@ -114,7 +114,8 @@ def main(argv): os.umask(oldmask) except Errors.MMBadEmailError: usage(1, 'Bad owner email address: ' + owner_mail) - + except Errors.MMListAlreadyExistsError: + usage(1, 'List already exists: ' + listname) print ALIASTEMPLATE % { 'listname': listname, -- cgit v1.3.1