[Mailman-Developers] [Fwd: Bug in Bounce.py]

Barry A. Warsaw barry@zope.com
Mon, 31 Dec 2001 16:09:06 -0500


>>>>> "DM" == Dan Mick <dmick@utopia.West.Sun.COM> writes:

    DM> Sent this to Barry late last night, but haven't seen a fix or
    DM> a note here, so: in case anyone else is having the same
    DM> problem:

    DM> I don't know if this is the correct fix, but using the GUI to
    DM> change bounce parameters has a problem without it:

Ah yes.  Python 2.2 has nested scopes turned on by default and I've
been testing with that version lately.  The code didn't go far enough
to work around for Python 2.1.  Try this patch (slightly simpler, but
essentially the same as Dan's).

Thanks!  (still having trouble reproducing the other problem, but I'm
going to try now with Python 2.1).

-Barry

-------------------- snip snip --------------------
Index: Bounce.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Gui/Bounce.py,v
retrieving revision 2.2
diff -u -r2.2 Bounce.py
--- Bounce.py	2001/12/27 07:06:39	2.2
+++ Bounce.py	2001/12/31 21:08:15
@@ -116,7 +116,8 @@
                 error(doc, varname, value)
 
     def HandleForm(self, mlist, cgidata, doc):
-        def convert(varname, func, mlist=mlist, cgidata=cgidata, doc=doc):
+        def convert(varname, func,
+                    self=self, mlist=mlist, cgidata=cgidata, doc=doc):
             self.__convert(mlist, cgidata, varname, doc, func)
 
         def to_days(value):