-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Barry Warsaw wrote: | On Jun 16, 2008, at 4:01 AM, Fil wrote: | |> (always with MysqlMemberships.py) |> I noticed that my bounce info stays in the database at level 1, even |> when the logs say "current bounce score: 2.0" | |> In Mailman/Bouncer.py I think that two self.setBounceInfo(member, |> info) are missing: | |> --- Mailman/Bouncer.save.py 2008-06-16 10:00:17.000000000 +0200 |> +++ Mailman/Bouncer.py 2008-06-16 10:00:43.000000000 +0200 |> @@ -137,6 +137,7 @@ class Bouncer: |> if lastbounce + self.bounce_info_stale_after < now: |> # Information is stale, so simply reset it |> info.reset(weight, day, |> self.bounce_you_are_disabled_warnings) |> + self.setBounceInfo(member, info) |> syslog('bounce', '%s: %s has stale bounce info, |> resetting', |> self.internal_name(), member) |> else: |> @@ -144,6 +145,7 @@ class Bouncer: |> # score and take any necessary action. |> info.score += weight |> info.date = day |> + self.setBounceInfo(member, info) |> syslog('bounce', '%s: %s current bounce score: %s', |> self.internal_name(), member, info.score) |> # Continue to the check phase below | | This makes some sense. I don't know anything about the | MysqlMembership.py adapter, but unlike the pickle-based standard | adapter, it probably needs this call to mark the object as modified so | that it will be stored in the db on the next save. The standard adapter | doesn't need this, because it's just going to pickle whatever the | current state is. | | The patch is a bit icky, but probably useful and I don't think it can | hurt the standard adapter.
This was discussed at length in October, 1985 in the thread that begins at <http://mail.python.org/pipermail/mailman-developers/2005-October/018255.html>. In particular, see my post at <http://mail.python.org/pipermail/mailman-developers/2005-October/018261.html> for an alternate patch which I thought was more complete. As I note in that post, I was new to Mailman at that time and was reluctant to commit that patch without additional input. In fact, I think I only acquired commit privileges during the time of that thread. In any case, I'll revisit it now for inclusion in 2.1.11. /Mark - -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFIV86sVVuXXpU7hpMRAnKCAKCkih1PjK4zET8zxYVSTd3PLyb/YQCgmAsj yooXIoWOtwqsiJ6FDbf5IPA= =Bnrm -----END PGP SIGNATURE----- _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp