[Mailman-Users] Clearing Bounce Scores Globally
Mark Sapiro
mark at msapiro.net
Fri Jun 8 02:20:40 CEST 2012
On 6/7/2012 9:15 AM, Dave (FitEyes) wrote:
> How about something like this code?
[...]
> for member in mlist.getMembers():
> if domain and not member.endswith(domain):
> continue
> del mlist.bounce_info[member]
> count += 1
Close, but that will throw a KeyError for any candidate member that
doesn't have bounce_info.
Instead of
del mlist.bounce_info[member]
you want
if member in mlist.bounce_info:
del mlist.bounce_info[member]
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list