diff options
Diffstat (limited to 'modules/maillist.py')
| -rw-r--r-- | modules/maillist.py | 9 |
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 |
