"WB" == William Bradford <mrbill@frenzy.com> writes:
WB> Tried to do the "Edit Options" section, and edit my personal
WB> user settings on a test list, and I got this output:
WB> (http://area51.mrbill.net/mailman/subscribe/test)
WB> We're sorry, we hit a bug! If you would like to help us
WB> identify the problem, please email a copy of this page to the
WB> webmaster for this site with a description of what
WB> happened. Thanks! Traceback:
Bill,
I was able to reproduce this problem on a test list. Funny, I'm not sure how this ever worked before! Here's a patch...
-Barry
-------------------- snip snip -------------------- Index: subscribe.py
RCS file: /projects/cvsroot/mailman/Mailman/Cgi/subscribe.py,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** subscribe.py 1998/07/13 21:27:10 1.5 --- subscribe.py 1998/07/31 23:03:13 1.6
*** 58,69 **** error = 0 results = ''
! def call_script(which, pathinfo): "A little bit of a hack to call one of the scripts..." os.environ['PATH_INFO'] = string.join(pathinfo, '/')
file = os.path.join(mm_cfg.SCRIPTS_DIR, which) list.Unlock()
! execfile(file) sys.exit(0)
#######
--- 58,70 ---- error = 0 results = ''
! def call_script(which, pathinfo, list): "A little bit of a hack to call one of the scripts..." os.environ['PATH_INFO'] = string.join(pathinfo, '/') list.Unlock() ! pkg = __import__('Mailman.Cgi', globals(), locals(), [which]) ! mod = getattr(pkg, which) ! mod.main() sys.exit(0)
#######
*** 92,98 **** print doc.Format() list.Unlock() sys.exit(0) ! call_script('options', [list._internal_name, member]) if not form.has_key("email"): error = 1 results = results + "You must supply a valid email address.<br>" --- 93,99 ---- print doc.Format() list.Unlock() sys.exit(0) ! call_script('options', [list._internal_name, member], list) if not form.has_key("email"): error = 1 results = results + "You must supply a valid email address.<br>"