Commit 14d25043 authored by Julien Muchembled's avatar Julien Muchembled

tests: fix file descriptor leak

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2745 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 517fc5e6
......@@ -38,6 +38,10 @@ def setupLog(name='NEO', filename=None, verbose=False):
level = logging_std.DEBUG
else:
level = logging_std.INFO
if logging is not None:
for handler in logging.handlers:
handler.close()
del logging.manager.loggerDict[logging.name]
logging = logging_std.getLogger(name)
for handler in logging.handlers[:]:
logging.removeHandler(handler)
......@@ -51,5 +55,6 @@ def setupLog(name='NEO', filename=None, verbose=False):
logging.propagate = 0
# Create default logger
logging = None
setupLog()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment