summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-01-17 00:02:48 +0300
committerAndrei Karas <akaras@inbox.ru>2018-01-17 00:02:48 +0300
commit520d3e36e7d0d185d46e44087d3f32647714ccba (patch)
treeea8ad42a1e448a5061ae8d50f694088e3552a143
parent03de3fcca9e2e08b00b2dfefe77230072860e959 (diff)
downloadevol-tools-520d3e36e7d0d185d46e44087d3f32647714ccba.tar.gz
evol-tools-520d3e36e7d0d185d46e44087d3f32647714ccba.tar.bz2
evol-tools-520d3e36e7d0d185d46e44087d3f32647714ccba.tar.xz
evol-tools-520d3e36e7d0d185d46e44087d3f32647714ccba.zip
testxml: add support for non ascii chars in error messages.s20180208
-rwxr-xr-xtestxml/testxml.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py
index d62d1f4..c96b8a8 100755
--- a/testxml/testxml.py
+++ b/testxml/testxml.py
@@ -63,18 +63,24 @@ class Layer:
def printErr(err):
errDict.add(err)
- print err
+ print err.encode("utf-8")
def showFileErrorById(id, rootDir, fileDir):
+ rootDir = rootDir.encode("utf-8")
+ fileDir = fileDir.encode("utf-8")
print "error: id=" + id + ", file not found: " + fileDir + " (" + rootDir + fileDir + ")"
def showFileWarningById(id, rootDir, fileDir):
+ rootDir = rootDir.encode("utf-8")
+ fileDir = fileDir.encode("utf-8")
print "warn: id=" + id + ", file not found: " + fileDir + " (" + rootDir + fileDir + ")"
def showError(id, text):
+ text = text.encode("utf-8")
print "error: id=" + id + " " + text
def showWarning(id, text):
+ text = text.encode("utf-8")
print "warn: id=" + id + " " + text
def showMsg(id, text, src, iserr):