This also got missed in the big unicode conversion. subprocess.Popen
(and it's wrappers like check_output) return bytes, but the module
expects UTF-8 unicode. This fixes that by decoding the output
appropriately.

Signed-off-by: Dylan Baker <[email protected]>
---
 tests/py_modules/constants.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/py_modules/constants.py b/tests/py_modules/constants.py
index a4c84bf..a4e7fb3 100644
--- a/tests/py_modules/constants.py
+++ b/tests/py_modules/constants.py
@@ -34,7 +34,8 @@ GENERATED_TESTS_DIR = os.path.abspath(
 # If on cygwin convert to a dos style path
 if sys.platform == 'cygwin':
     def dosify(p):
-        return subprocess.check_output(['cygpath', '-d', p]).rstrip()
+        return subprocess.check_output(
+            ['cygpath', '-d', p]).rstrip().decode('utf-8')
 
     TESTS_DIR = dosify(TESTS_DIR)
     GENERATED_TESTS_DIR = dosify(GENERATED_TESTS_DIR)
-- 
2.8.0

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to