backport fix for #713

This commit is contained in:
Punyashloka Biswal
2015-06-16 16:35:31 -04:00
committed by Bruno Oliveira
parent f04e01f55f
commit 0c05b906d4
4 changed files with 24 additions and 2 deletions
+4 -2
View File
@@ -123,10 +123,12 @@ class LogXML(object):
Junit.skipped(message="xfail-marked test passes unexpectedly"))
self.skipped += 1
else:
if isinstance(report.longrepr, (unicode, str)):
if hasattr(report.longrepr, "reprcrash"):
message = report.longrepr.reprcrash.message
elif isinstance(report.longrepr, (unicode, str)):
message = report.longrepr
else:
message = report.longrepr.reprcrash.message
message = str(report.longrepr)
message = bin_xml_escape(message)
fail = Junit.failure(message=message)
fail.append(bin_xml_escape(report.longrepr))