[Mailman-Developers] MM 2.1a2: bug if dont_respond_to_post_requests=N -> lang is undefined

Luca Maranzano liuk@publinet.it
Thu, 30 Aug 2001 19:35:32 +0200


Hi,

I've already submitted a bug to SF about this, but I can confirm that if I set
dont_respond_to_post_requests to NO then this seems to arise a bug in Hold.py,
i.e. the variable lang is not set and I get the following error:

Aug 30 16:43:04 2001 (17624) Uncaught runner exception: Local variable 'lang' referenced before
assignment
Aug 30 16:43:04 2001 (17624) Traceback (most recent call last):
  File "/home/mailman/Mailman/Queue/IncomingRunner.py", line 134, in _dopipeline
    sys.modules[modname].process(mlist, msg, msgdata)
  File "/home/mailman/Mailman/Handlers/Hold.py", line 145, in process
    hold_for_approval(mlist, msg, msgdata, ModeratedPost)
  File "/home/mailman/Mailman/Handlers/Hold.py", line 277, in hold_for_approval
    charset=Utils.GetCharSet(lang))
UnboundLocalError: Local variable 'lang' referenced before assignment
 
I think that the patch is quite simple, but I'm not yet able to provide it :)

MM 2.1a2.

Regards,
Luca