[Piglit] Fresh driver_classifier.py type error fix

Dan Kegel dank at kegel.com
Fri Sep 16 16:12:21 UTC 2016


piglit stopped working for me this morning with a TypeError on ubuntu 16.04.
That's what I get for running off of tip, the file that broke was only
created six hours ago :-)

Here's a tiny change that got me running again.

>From 80a2d9c6d7eaa322e87a4400d9bb2076d0341b35 Mon Sep 17 00:00:00 2001
From: Dan Kegel <dank at oblong.com>
Date: Fri, 16 Sep 2016 09:07:21 -0700
Subject: [PATCH] Work around Typeerror: cannot use a string pattern on
a bytes-like object on ubuntu 16.04

---
 framework/driver_classifier.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/driver_classifier.py b/framework/driver_classifier.py
index af25665..c2d7a13 100644
--- a/framework/driver_classifier.py
+++ b/framework/driver_classifier.py
@@ -64,7 +64,7 @@ class DriverClassifier(object):
             return

         for line in output.splitlines():
-            m = re.match('OpenGL renderer string: (.*)', line)
+            m = re.match('OpenGL renderer string: (.*)', line.decode('utf-8'))
             if m is not None:
                 self.renderer = m.group(1)
                 break
--
libgit2 0.24.0


More information about the Piglit mailing list