diff options
author | Timofey <t.danshin@corp.mail.ru> | 2017-02-28 13:28:57 +0300 |
---|---|---|
committer | Timofey <t.danshin@corp.mail.ru> | 2017-02-28 13:28:57 +0300 |
commit | 2edc2fc85db01324945a9229595b0a5436505db1 (patch) | |
tree | cee73ff8c9661c0a158fdc6a79f992e5ea0ba4ce /tools/python | |
parent | fce669d15b40e5ad84ccab924769dc26c21d284a (diff) |
Added more characters for replacement in log to xml converter.
Diffstat (limited to 'tools/python')
-rwxr-xr-x | tools/python/testlog_to_xml_converter.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/python/testlog_to_xml_converter.py b/tools/python/testlog_to_xml_converter.py index 62f8e3a2ba..4ae31475c8 100755 --- a/tools/python/testlog_to_xml_converter.py +++ b/tools/python/testlog_to_xml_converter.py @@ -15,6 +15,8 @@ import xml.etree.ElementTree as ElementTree from optparse import OptionParser import re +REPLACE_CHARS_RE = re.compile("[\x00-\x1f]") + class PrefixesInLog: OK = "OK" @@ -202,7 +204,7 @@ class Parser: if line == "All tests passed." or re.match("\d{1,} tests failed", line, re.IGNORECASE): self.var_should_pass = True return False - line = line.replace("\0", "\\0") + line = REPLACE_CHARS_RE.sub("_", line) self.test_info.append_comment(line) return False |