Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cab4a5

Browse files
committed
fix for bug reported by m4l1c3 (UnicodeEncodeError)
1 parent 8cb9558 commit 0cab4a5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/core/dump.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import os
2828

2929
from lib.core.common import dataToDumpFile
30+
from lib.core.common import dataToStdout
3031
from lib.core.common import getUnicode
3132
from lib.core.data import conf
3233
from lib.core.data import logger
@@ -44,12 +45,12 @@ def __init__(self):
4445

4546
def __write(self, data, n=True):
4647
if n:
47-
print data
48-
self.__outputFP.write("%s\n" % data)
48+
text = "%s\n" % data
4949
else:
50-
print data,
51-
self.__outputFP.write("%s " % data)
50+
text = "%s " % data
5251

52+
dataToStdout(text)
53+
self.__outputFP.write(text)
5354
self.__outputFP.flush()
5455

5556
conf.loggedToOut = True

0 commit comments

Comments
 (0)