Commit 51149f4f authored by Vincent Pelletier's avatar Vincent Pelletier

Better iterate over a copy of a list, as it is modified inside loop.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2378 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 70dcead3
...@@ -28,7 +28,7 @@ def setupLog(name='NEO', filename=None, verbose=False): ...@@ -28,7 +28,7 @@ def setupLog(name='NEO', filename=None, verbose=False):
level = logging_std.INFO level = logging_std.INFO
fmt = PREFIX + SUFFIX fmt = PREFIX + SUFFIX
logging = logging_std.getLogger(name.upper()) logging = logging_std.getLogger(name.upper())
for handler in logging.handlers: for handler in logging.handlers[:]:
logging.removeHandler(handler) logging.removeHandler(handler)
if filename is None: if filename is None:
handler = logging_std.StreamHandler() handler = logging_std.StreamHandler()
......
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