summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorbwarsaw2000-04-09 23:23:22 +0000
committerbwarsaw2000-04-09 23:23:22 +0000
commitfb02238fd962dc66308c02da0ff90457920c41c2 (patch)
tree243ad547e9c0ca1756475a7aa22211adf54dd9d6 /bin
parentdebc6f09861e179fdf8638d14d37f50c2f18116a (diff)
downloadmailman-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-xbin/newlist5
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,