subunithelper: Don't access 'message' attribute directly as it deprecated
authorKamen Mazdrashki <kamenim@samba.org>
Sun, 10 Oct 2010 01:07:56 +0000 (03:07 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 10 Oct 2010 01:50:09 +0000 (01:50 +0000)
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 10 01:50:09 UTC 2010 on sn-devel-104

selftest/subunithelper.py

index 13b0580ebfa831c9a80ce00752f8790c3042af05..b9291b8f25918b36aefe8ddf2ba30ae1d45d9ca5 100644 (file)
@@ -495,7 +495,7 @@ class PlainFormatter(TestsuiteEnabledTestResult):
 
         self.test_output[self.name] += "UNEXPECTED(%s): %s\n" % (result, testname)
         if reason is not None:
-            self.test_output[self.name] += "REASON: %s\n" % (reason[1].message.encode("utf-8").strip(),)
+            self.test_output[self.name] += "REASON: %s\n" % (unicode(reason[1]).encode("utf-8").strip(),)
 
         if self.immediate and not self.verbose:
             print self.test_output[self.name]