提交 9df2a860 编写于 作者: L Lukáš Doktor

plugins.xunit: correct the read size from the back of the file

When attaching only partial log file we already calculate the "size =
max_size / 2", therefor it does not make sense to divide it twice (it
actually results in even shorter attached logs.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 d3487744
......@@ -76,7 +76,7 @@ class XUnitResult(Result):
text_output = logfile_obj.read(size)
text_output += ("\n\n--[ CUT DUE TO XML PER TEST "
"LIMIT ]--\n\n")
logfile_obj.seek(-size / 2, 2)
logfile_obj.seek(-size, 2)
text_output += logfile_obj.read()
else:
text_output = logfile_obj.read()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册