From d658e88f635fa84341e71d2de9151a37e1c69914 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 18 Jun 2009 16:29:22 -0400 Subject: Make the UI work when both python-cherrypy and python-cherrypy2 are installed Also shut down logging different in ipa_webui. Rather than calling logging.shutdown() pull all the log handlers and close them. 505686 --- ipa-server/ipa-gui/ipa_webgui | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ipa-server/ipa-gui/ipa_webgui b/ipa-server/ipa-gui/ipa_webgui index 677fc9a5b..e38479f07 100644 --- a/ipa-server/ipa-gui/ipa_webgui +++ b/ipa-server/ipa-gui/ipa_webgui @@ -17,6 +17,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +__requires__ = 'TurboGears' + import os, sys, pwd, grp from optparse import OptionParser import traceback @@ -175,7 +177,10 @@ def main(): # Shut down the logging set up here so that CherryPy logging can take # over. TurboGears configuration errors will not be caught. if not foreground: - logging.shutdown() + l = logging.getLogger() + for h in logging.root.handlers: + l.removeHandler(h) + # Load the config - look for a local file first for development # and then the system config file -- cgit