[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
>fails...
Yes, I see that now.
>Utils.to_percent(text) transforms:
>
>http://list-test.example.com/mailman/options/test2/member%40example.com
>
>to
>
>http://list-test.example.com/mailman/options/test2/member%%40example.com
>
>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 '$'
characters.
I think a better solution is to change
'options_url': mlist.GetOptionsURL(sender, absolute=True),
to
'options_url': mlist.GetOptionsURL(sender,
obscure=True,
absolute=True),
This will return the URL in the form
http://list-test.example.com/mailman/options/test2/member--at--example.com
which will still work as the options URL and will avoid the '%40'
problem.
>The traceback:
>
>Aug 21 16:10:27 2008 (30631) Uncaught runner exception: float argument
>required
>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
>_dispose
> more = self._dopipeline(mlist, msg, msgdata, pipeline)
> File "/u01/app/mailman/Mailman/Queue/IncomingRunner.py", line 168, in
>_dopipeline
> 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:
>1219331427.083775+4689301c9a60d888b46d47dfb14ee4a7be2c436e
--
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