[Piglit] [PATCH 3/4] framework: unoicode() wrap format string

Daniel Vetter daniel.vetter at ffwll.ch
Tue Nov 27 11:52:47 PST 2012


Otherwise python2 blows up when the program output contains a non-ascii
character. The resulting exception caused a bunch of spurious fails in
the igt testscases.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 framework/exectest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index 244d7d9..aa89c66 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -148,7 +148,7 @@ class ExecTest(Test):
 			if env:
 				results['environment'] = env
 
-			results['info'] = "Returncode: {0}\n\nErrors:\n{1}\n\nOutput:\n{2}".format(returncode, err, out)
+			results['info'] = unicode("Returncode: {0}\n\nErrors:\n{1}\n\nOutput:\n{2}").format(returncode, err, out)
 			results['returncode'] = returncode
 			results['command'] = ' '.join(self.command)
 
-- 
1.7.11.7



More information about the Piglit mailing list