>Revision: 8036 > http://svn.sourceforge.net/mailman/?rev=8036&view=rev >Author: tkikuchi >Date: 2006-09-22 06:05:30 -0700 (Fri, 22 Sep 2006) > >Log Message: >----------- >I needed this for web ui to work. > >Modified Paths: >-------------- > trunk/mailman/Mailman/loginit.py > >Modified: trunk/mailman/Mailman/loginit.py >=================================================================== >--- trunk/mailman/Mailman/loginit.py 2006-09-21 18:23:48 UTC (rev 8035) >+++ trunk/mailman/Mailman/loginit.py 2006-09-22 13:05:30 UTC (rev 8036) >@@ -25,6 +25,7 @@ > import logging > > from Mailman.configuration import config >+config.load() > > FMT = '%(asctime)s (%(process)d) %(message)s' > DATEFMT = '%b %d %H:%M:%S %Y' > >
Yes, but this is not the proper fix. I think the place to put config.load() for the web interface is in scripts/driver. I sent the following to Barry a few weeks ago, but to date have seen no reply. ----------- excerpt from message to Barry ------------------- Unfortunately, I neglected to report something else I saw because I didn't have time to figure it out. I'm still not sure about this, but here's the problem: [EMAIL PROTECTED] ...f/test-mailman]$ scripts/post Traceback (most recent call last): File "scripts/post", line 48, in ? main() File "scripts/post", line 39, in main status = sys.modules[module_name].main() File "/cygdrive/f/test-mailman/Mailman/bin/post.py", line 44, in main loginit.initialize(propagate=True) File "/cygdrive/f/test-mailman/Mailman/loginit.py", line 119, in initialize handler = ReopenableFileHandler(os.path.join(config.LOG_DIR, logger)) AttributeError: 'Configuration' object has no attribute 'LOG_DIR' In this case, nothing has called config.load(). The same problem exists in the web interface. That can be fixed with --- f:/MM-Trunk/mailman/scripts/driver 2006-05-16 20:09:56.437500000 -0700 +++ scripts/driver 2006-08-29 09:51:32.375000000 -0700 @@ -68,6 +68,8 @@ log = None try: import paths + from Mailman.configuration import config + config.load() # When running in non-stealth mode, we need to escape entities, # otherwise we're vulnerable to cross-site scripting attacks. try: but this then leads to other places where we try to sort the set returned by Utils.list_names() I can work on cleaning this up, but I'd like confirmation that scripts/driver is the right place for config.load() and also what to do about the various scripts invoked by the mail wrapper. --------------------end excerpt------------------------- The problem with calling config.load() from loginit is I think it will override the loading of a alternate config which may have been specified as a command line option for those commands that support it (at least the ones that do logging too). -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp