Skip to content

Commit 715b160

Browse files
author
Richard Jones
committed
Fix file handle leak in some web interfaces with logging turned on
1 parent f4f3c44 commit 715b160

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Fixes:
2323
checks
2424
- Improvements in upgrading documentation, thanks Christian Glass
2525
- Display 'today' in the account user's timezone, thanks David Wolever
26+
- Fix file handle leak in some web interfaces with logging turned on,
27+
fixes issue1675845
2628

2729

2830
2009-12-21 1.4.11 (r4413)

roundup/configuration.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,9 @@ def init_logging(self):
12881288
'%(asctime)s %(levelname)s %(message)s')
12891289
hdlr.setFormatter(formatter)
12901290
# no logging API to remove all existing handlers!?!
1291+
for h in logger.handlers:
1292+
h.close()
1293+
logger.removeHandler(hdlr)
12911294
logger.handlers = [hdlr]
12921295
logger.setLevel(logging._levelNames[self["LOGGING_LEVEL"] or "ERROR"])
12931296

0 commit comments

Comments
 (0)