Fix handling of unexpected failures in subunithelper.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 13 Dec 2014 21:37:51 +0000 (21:37 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Mar 2015 03:41:47 +0000 (04:41 +0100)
Change-Id: I0da9fcec4a54c43c171b76bb9015ea84389c9bc6
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/subunithelper.py

index ed90269f89c4f38f429416f46fb351d48620b194..df6eb7c14d84099a53de31f592cdc4eacd49e27e 100644 (file)
@@ -572,7 +572,7 @@ class PlainFormatter(TestsuiteEnabledTestResult):
 
         self.test_output[self.name] += "UNEXPECTED(%s): %s\n" % (result, testname)
         if err is not None:
-            self.test_output[self.name] += "REASON: %s\n" % err.encode("utf-8").strip()
+            self.test_output[self.name] += "REASON: %s\n" % str(err[1]).strip()
 
         if self.immediate and not self.verbose:
             sys.stdout.write(self.test_output[self.name])