[Piglit] Fresh driver_classifier.py type error fix
Dylan Baker
dylan at pnwbakers.com
Fri Sep 16 17:53:01 UTC 2016
Quoting Dan Kegel (2016-09-16 09:12:21)
> 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
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
I'm not sure this is the right place to fix this. I think we should just
decode the output in collect_glxinfo when we assign to self.renderer.
Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160916/b8a850e0/attachment.sig>
More information about the Piglit
mailing list