[Mailman-Developers] Storing other data in the list object

Barry Warsaw barry at python.org
Thu May 19 15:17:48 CEST 2005

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_').


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/mailman-developers/attachments/20050519/2fb41efa/attachment.pgp

More information about the Mailman-Developers mailing list