[Piglit] [PATCH 1/3] framework/backends/json: replace str() with six.text_type()

Dylan Baker dylan at pnwbakers.com
Tue Oct 11 00:06:52 UTC 2016


Since str() is incorrect in python2.x. This also fixes an indentation
error.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/backends/json.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/backends/json.py b/framework/backends/json.py
index f279f2f..cf7f119 100644
--- a/framework/backends/json.py
+++ b/framework/backends/json.py
@@ -279,7 +279,7 @@ def _load(results_file):
         raise exceptions.PiglitFatalError(
             'While loading json results file: "{}",\n'
             'the following error occurred:\n{}'.format(results_file.name,
-                                                      str(e)))
+                                                       six.text_type(e)))
 
     if isinstance(result, results.TestrunResult):
         return result
-- 
2.10.0



More information about the Piglit mailing list