diff options
| author | bwarsaw | 2000-04-09 23:23:22 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-04-09 23:23:22 +0000 |
| commit | fb02238fd962dc66308c02da0ff90457920c41c2 (patch) | |
| tree | 243ad547e9c0ca1756475a7aa22211adf54dd9d6 /bin | |
| parent | debc6f09861e179fdf8638d14d37f50c2f18116a (diff) | |
| download | mailman-fb02238fd962dc66308c02da0ff90457920c41c2.tar.gz mailman-fb02238fd962dc66308c02da0ff90457920c41c2.tar.zst mailman-fb02238fd962dc66308c02da0ff90457920c41c2.zip | |
main(): Use Utils.list_exists() to test for list existance.
Catch MMListAlreadyExistsError in mlist.Create() -- this is probably
redundant.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/newlist | 5 |
1 files 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, |
