[Mailman-Developers] Problem with my auto-bounce patch for 2.0.8 in 2.0.13

Barry A. Warsaw barry@python.org
Wed Nov 6 13:07:37 2002

>>>>> "PCN" == Peter C Norton <spacey-mailman@lenin.nu> writes:

    PCN> However, I've created a bug in the privacy options page.  For
    PCN> some reason, changes I made to the MailList class in
    PCN> MailList.py (adding the attribute
    PCN> self.auto_reject_nonmembers) isn't reflected in the
    PCN> HandlerAPI.py call to do_pipeline(mlist, msg, msgdata).
    PCN> AttributeError: auto_reject_nonmembers

    PCN> I'm not sure what a Delivery exception is caused by, but I'm
    PCN> inferring from the AttributeError that it can't find
    PCN> mlist.auto_reject_nonmembers.  how cna this be?  Is there
    PCN> somewhere else besides MailList.py where MailList objects are
    PCN> created?  Or is there somewhere special that HandlerAPI.py or
    PCN> Hold.py is doing?

    PCN> Help?  I can't suppress obnoxios posters for now, and the
    PCN> prospect of having to moderate posts from non-members is too
    PCN> horrible to contempate.

Remember that existing lists get their state unpickled from the
config.db file, so just adding `auto_reject_nonmembers' in the
MailList constructor isn't enough.  New lists will pick up that
attribute, but existing lists won't have it.

You have two choices: either you can conditionalize the getting of the
auto_reject_nonmembers attribute with something like:

    if getattr(mlist, 'auto_reject_nonmembers', 0):

or you can add it to existing lists via the schema update mechanisms
in version.py.  See NewVars() and remember that you'll have to bump
DATA_FILE_VERSION in Version.py.


More information about the Mailman-Developers mailing list