Storing other data in the list object
Hi,
The Mailman system I'm putting together has lists automatically created/deleted depending on another database (i.e. the university database defines what lists exist, and who owns them, and Mailman should then match this).
I need to be able to store information about when the list was created (this is used in the synchronization procedure). I could save this in another text file, but that is something else to go wrong / get out of synch. Therefore, is the following safe to do, (assuming I use a variable that is unlikely to be used by Mailman itself)? Is there a place I should be using instead of this (i.e. a dictionary in the object called "localdata")?
m = MailList.MailList(listname, lock=1) m.uol_createddate = "something" m.Save() m.Unlock()
Thanks!
Matthew
-- Matthew Newton <mcn4@le.ac.uk>
UNIX and e-mail Systems Administrator, Network Support Section, Computer Centre, University of Leicester, Leicester LE1 7RH, United Kingdom
On Thu, 2005-05-19 at 06:58, Matthew Newton wrote:
I need to be able to store information about when the list was created (this is used in the synchronization procedure). I could save this in another text file, but that is something else to go wrong / get out of synch. Therefore, is the following safe to do, (assuming I use a variable that is unlikely to be used by Mailman itself)? Is there a place I should be using instead of this (i.e. a dictionary in the object called "localdata")?
m = MailList.MailList(listname, lock=1) m.uol_createddate = "something" m.Save() m.Unlock()
Yes, it is safe to do, if you pick the right attribute names. I suggest using something like m.x_my_special_thing as the name (i.e. I hereby guarantee that Mailman will not use names that start with 'x_').
-Barry
participants (2)
-
Barry Warsaw
-
Matthew Newton