diff options
| author | bwarsaw | 2000-07-05 20:41:36 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-07-05 20:41:36 +0000 |
| commit | b1b4e2e7fde9a83f0a41264155526bcf08bad4a2 (patch) | |
| tree | 17bd603f47bc6910d9d4f989820e2536dd21bbe8 /Mailman | |
| parent | c611bd6392f06be0cc326c272e784fbd417ea3f7 (diff) | |
| download | mailman-b1b4e2e7fde9a83f0a41264155526bcf08bad4a2.tar.gz mailman-b1b4e2e7fde9a83f0a41264155526bcf08bad4a2.tar.zst mailman-b1b4e2e7fde9a83f0a41264155526bcf08bad4a2.zip | |
Create(): Fold in the CreateFiles() method. Don't use self.Lock()
here because that reloads the database as a side-effect - but the
config.db file doesn't exist at this point! This fixes the newlist
problem. Also, there's no need to create the LOCK_DIR file; and use a
safer way to create the next-digest and next-digest-topics files
(which I'm not sure are strictly necessary anymore).
CreateFiles(): Removed.
Diffstat (limited to '')
| -rw-r--r-- | Mailman/MailList.py | 24 |
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) |
