[Piglit] [PATCH] Fix Python 2.6 incompatibility in str.decode() function.
Paul Berry
stereotype441 at gmail.com
Fri Aug 12 16:05:33 PDT 2011
In Python 2.6, the str.decode() function can't take keyword arguments,
so x.decode(y, errors=z) must be changed to x.decode(y, z). There is
no difference in functionality.
---
framework/exectest.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/framework/exectest.py b/framework/exectest.py
index e3327b1..dc9dc9e 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -69,8 +69,8 @@ class ExecTest(Test):
# replaces erroneous charcters with the Unicode
# "replacement character" (a white question mark inside
# a black diamond).
- out = out.decode('utf-8', errors='replace')
- err = err.decode('utf-8', errors='replace')
+ out = out.decode('utf-8', 'replace')
+ err = err.decode('utf-8', 'replace')
results = TestResult()
--
1.7.6
More information about the Piglit
mailing list