From: richard Date: Mon, 1 Feb 2010 02:58:07 +0000 (+0000) Subject: Fix file handle leak in some web interfaces with logging turned on X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2f181f7a8e73933d949fb1af3320b70527fb6b7a;p=roundup.git Fix file handle leak in some web interfaces with logging turned on git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4441 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index cabecaf..2262b94 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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) diff --git a/roundup/configuration.py b/roundup/configuration.py index bd2811e..f15adbd 100644 --- a/roundup/configuration.py +++ b/roundup/configuration.py @@ -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"])