[Mailman-Users] Rejection notice substitution variables(member_moderation_notice)

Mark Sapiro mark at msapiro.net
Thu Aug 21 17:46:45 CEST 2008

Rodriguez Gomez Pedro wrote:

>I'm afraid that even the new version ("Utils.wrap" after "text % d") has
>the same problem

Moving "Utils.wrap" after "text % d" wasn't intended to fix the
TypeError exception. It was intended to make the message look prettier
by wrapping the text to width after interpolation rather than before

>...I think the "post processing" that goes after the
>code in Moderate.py finds the percentage in "%40" (corresponding to the
>url encoding of "@" in the email address part of options_url) and it

Yes, I see that now.

>Utils.to_percent(text) transforms:
>allowing the "post processing" to finish without problems.

Yes, but it is also overkill and possibly has other inintended side
effects or would have if the reject message contained any '$'

I think a better solution is to change

 'options_url': mlist.GetOptionsURL(sender, absolute=True),


                         'options_url': mlist.GetOptionsURL(sender,

This will return the URL in the form


which will still work as the options URL and will avoid the '%40'

>The traceback:
>Aug 21 16:10:27 2008 (30631) Uncaught runner exception: float argument
>Aug 21 16:10:27 2008 (30631) Traceback (most recent call last):
>  File "/u01/app/mailman/Mailman/Queue/Runner.py", line 120, in _oneloop
>    self._onefile(msg, msgdata)
>  File "/u01/app/mailman/Mailman/Queue/Runner.py", line 191, in _onefile
>    keepqueued = self._dispose(mlist, msg, msgdata)
>  File "/u01/app/mailman/Mailman/Queue/IncomingRunner.py", line 130, in
>    more = self._dopipeline(mlist, msg, msgdata, pipeline)
>  File "/u01/app/mailman/Mailman/Queue/IncomingRunner.py", line 168, in
>    mlist.BounceMessage(msg, msgdata, e)
>  File "/u01/app/mailman/Mailman/Bouncer.py", line 296, in BounceMessage
>    notice = _(e.notice())
>  File "/u01/app/mailman/Mailman/i18n.py", line 90, in _
>    return tns % dict
>TypeError: float argument required
>Aug 21 16:10:27 2008 (30631) SHUNTING:

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