[Mailman-Developers] Problem with my auto-bounce patch for 2.0.8
Peter C. Norton
Wed Nov 6 16:21:09 2002
On Wed, Nov 06, 2002 at 08:07:37AM -0500, Barry A. Warsaw wrote:
> >>>>> "PCN" == Peter C Norton <firstname.lastname@example.org> 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.
The list did have that attribute, though. I created it with the
patch under 2.0.8. Is there a chance that it got re-set in the upgrade.
> 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.
I did that last time. I guess I can try that again. Perhaps my patch
put in the wrong (lower) version.
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.
More information about the Mailman-Developers