[Mailman-Users] Re: quick-fix patch for newlist failure
Barry A. Warsaw
bwarsaw at beopen.com
Fri Jun 30 05:07:27 CEST 2000
>>>>> "DM" == Dan Mick <Dan.Mick at West.Sun.COM> writes:
DM> Here's a fix that's probably safe, and fixes the "newlist"
DM> problem. Of course I'm not sure if it's the right final fix,
DM> but I figure while Barry's examining the problem, this might
DM> be worth a try for some of you.
I just got back from a gig -- thanks for the quick fix Dan. Here's a
slightly better one that also fixes a few other ugly bits.
This is serious enough to warrant a quick beta4, but I want to spend a
couple of hours looking into Ricardo's problem (which I still can't
reproduce). Better that then having to do a beta5 over the weekend ;}
I'm just too beat tonight.
-Barry
Index: MailList.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/MailList.py,v
retrieving revision 1.172
diff -u -r1.172 MailList.py
--- MailList.py 2000/06/28 18:40:48 1.172
+++ MailList.py 2000/06/30 03:04:42
@@ -782,23 +782,21 @@
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)
More information about the Mailman-Users
mailing list