Code

Fix file handle leak in some web interfaces with logging turned on
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 1 Feb 2010 02:58:07 +0000 (02:58 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 1 Feb 2010 02:58:07 +0000 (02:58 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4441 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/configuration.py

index cabecaf1d3d94b7be92248580b940f98e0c8d1cf..2262b94fe172730542c3d47e91835fba314fd731 100644 (file)
@@ -23,6 +23,8 @@ Fixes:
   checks
 - Improvements in upgrading documentation, thanks Christian Glass
 - Display 'today' in the account user's timezone, thanks David Wolever
+- Fix file handle leak in some web interfaces with logging turned on,
+  fixes issue1675845
 
 
 2009-12-21 1.4.11 (r4413)
index bd2811edbaf6b2b097606feade5bb19478867301..f15adbd46301a909204da4be4794fbf2d718aef9 100644 (file)
@@ -1288,6 +1288,9 @@ class CoreConfig(Config):
             '%(asctime)s %(levelname)s %(message)s')
         hdlr.setFormatter(formatter)
         # no logging API to remove all existing handlers!?!
+        for h in logger.handlers:
+            h.close()
+            logger.removeHandler(hdlr)
         logger.handlers = [hdlr]
         logger.setLevel(logging._levelNames[self["LOGGING_LEVEL"] or "ERROR"])