summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/MailList.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 3efb5ea6e..2eb444b84 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -782,23 +782,21 @@ it will not be changed."""),
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
- self.InitTemplates()
- self.Save()
- self.CreateFiles()
-
- def CreateFiles(self):
+ # Don't use Lock() since that tries to load the non-existant config.db
+ self.__lock.lock()
+ self.InitVars(name, admin, crypted_password)
+ self._ready = 1
+ self.InitTemplates()
+ self.Save()
# Touch these files so they have the right dir perms no matter what.
# A "just-in-case" thing. This shouldn't have to be here.
ou = os.umask(002)
try:
- open(os.path.join(mm_cfg.LOCK_DIR, '%s.lock' %
- self._internal_name), 'a+').close()
- open(os.path.join(self._full_path, "next-digest"), "a+").close()
- open(os.path.join(self._full_path, "next-digest-topics"),
- "a+").close()
+ path = os.path.join(self._full_path, 'next-digest')
+ fp = open(path, "a+")
+ fp.close()
+ fp = open(path+'-topics', "a+")
+ fp.close()
finally:
os.umask(ou)