From 0cab4a5355a09ae48bb2994703626eec9d40f374 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 8 Aug 2010 21:22:37 +0000 Subject: [PATCH] fix for bug reported by m4l1c3 (UnicodeEncodeError) --- lib/core/dump.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index 47087687c..7ca1cd393 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -27,6 +27,7 @@ import re import os from lib.core.common import dataToDumpFile +from lib.core.common import dataToStdout from lib.core.common import getUnicode from lib.core.data import conf from lib.core.data import logger @@ -44,12 +45,12 @@ class Dump: def __write(self, data, n=True): if n: - print data - self.__outputFP.write("%s\n" % data) + text = "%s\n" % data else: - print data, - self.__outputFP.write("%s " % data) + text = "%s " % data + dataToStdout(text) + self.__outputFP.write(text) self.__outputFP.flush() conf.loggedToOut = True