Fix bug introduced in previous commit.

This commit is contained in:
Pedro Algarvio 2010-12-06 12:34:57 +00:00
parent 26e45dcbc8
commit 49e10ea0cf

View File

@ -155,8 +155,9 @@ def setupLogger(level="error", filename=None, filemode="w"):
delay=0
)
elif filename and filemode=='w':
getattr(logging.handlers, 'WatchedFileHandler', logging.FileHandler)(
filename, filemode, 'utf-8', delay=0
handler = getattr(
logging.handlers, 'WatchedFileHandler', logging.FileHandler)(
filename, filemode, 'utf-8', delay=0
)
else:
handler = logging.StreamHandler()