[Mailman-Users] Moderated postings return error on reason_notice()

Mark Sapiro msapiro at value.net
Thu Feb 8 22:10:14 CET 2007


M. Onur ERGiN wrote:

>I got a system crush on my linux server, and after I did rescue everything, the following weird problem has appeared. There is no problem with postings of nonmoderated members, but whenever a moderated member sends mail to a list, the message gets lost and following log appears in 'log/error'. 

<snip>

>Feb 08 18:53:37 2007 (1904) Uncaught runner exception: unbound method reason_notice() must be called with ModeratedMemberPost instance as first argument (got nothing instead)
>Feb 08 18:53:37 2007 (1904) Traceback (most recent call last):
>  File "/var/mailman/Mailman/Queue/Runner.py", line 111, in _oneloop
>    self._onefile(msg, msgdata)
>  File "/var/mailman/Mailman/Queue/Runner.py", line 167, in _onefile
>    keepqueued = self._dispose(mlist, msg, msgdata)
>  File "/var/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
>    more = self._dopipeline(mlist, msg, msgdata, pipeline)
>  File "/var/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline
>    sys.modules[modname].process(mlist, msg, msgdata)
>  File "/var/mailman/Mailman/Handlers/Moderate.py", line 67, in process
>    ModeratedMemberPost)
>  File "/var/mailman/Mailman/Handlers/Hold.py", line 216, in hold_for_approval
>    reason = Utils.wrap(exc.reason_notice())
>TypeError: unbound method reason_notice() must be called with ModeratedMemberPost instance as first argument (got nothing instead)



It seems you probably didn't rescue everything properly. This error in
the hold_for_approval() function in Hold.py should not be occurring
unless you wound up post-rescue using a pre 2.1.9 Mailman with Python
2.5

At the point of the exception exc is a class ModeratedMemberPost
instead of an instance of that class, yet the beginning of
hold_for_approval() has

    if isinstance(exc, ClassType) or isinstance(exc, type(type)):
        # Go ahead and instantiate it now.
        exc = exc()

or pre Mailman 2.1.9

    if type(exc) is ClassType:
        # Go ahead and instantiate it now.
        exc = exc()

This should render the exception 'impossible' unless you are using a
pre 2.1.9 Mailman with Python 2.1.5. If so, I think this is an
incompatability.

-- 
Mark Sapiro <msapiro at value.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