summaryrefslogtreecommitdiff
path: root/modules/maillist.py
diff options
context:
space:
mode:
authormailman1998-02-25 00:40:26 +0000
committermailman1998-02-25 00:40:26 +0000
commitdfcac77800857fe8cdf88e70bc868c4b81c5e8f8 (patch)
tree6ed9ac7e1b39b30b88843d9c13bc3a263e7fb0fc /modules/maillist.py
parentcc7129cf06e4e596600f9e848cb20d049a246d51 (diff)
downloadmailman-dfcac77800857fe8cdf88e70bc868c4b81c5e8f8.tar.gz
mailman-dfcac77800857fe8cdf88e70bc868c4b81c5e8f8.tar.zst
mailman-dfcac77800857fe8cdf88e70bc868c4b81c5e8f8.zip
Diffstat (limited to 'modules/maillist.py')
-rw-r--r--modules/maillist.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/maillist.py b/modules/maillist.py
index 5ba2ba38d..201f87d26 100644
--- a/modules/maillist.py
+++ b/modules/maillist.py
@@ -243,13 +243,12 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
return config_info
def Create(self, name, admin, crypted_password):
- self._internal_name = name
- self._full_path = os.path.join(mm_cfg.LIST_DATA_DIR, name)
- if os.path.isdir(self._full_path):
- if os.path.exists(os.path.join(self._full_path, 'config.db')):
- raise ValueError, 'List %s already exists.' % name
+ if name in list_names():
+ raise ValueError, 'List %s already exists.' % name
else:
mm_utils.MakeDirTree(os.path.join(mm_cfg.LIST_DATA_DIR, name))
+ self._full_path = os.path.join(mm_cfg.LIST_DATA_DIR, name)
+ self._internal_name = name
self.Lock()
self.InitVars(name, admin, crypted_password)
self._ready = 1