From 19eb9208564a8af037bd4866b8ad48b28355cb21 Mon Sep 17 00:00:00 2001 From: Jerome Kieffer <kieffer@lintaillefer.esrf.fr> Date: Tue, 12 Dec 2017 14:50:39 +0100 Subject: [PATCH] Check for integer --- pyopencl/cffi_cl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index a7c7d2a5..826fd036 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -338,7 +338,7 @@ class device_type(_ConstantsNamespace): # noqa continue if not name.startswith("_"): bitfield = getattr(cls, name) - if ((bitfield & value) == bitfield): + if isinstance(bitfield, int) and ((bitfield & value) == bitfield): return name if default_format is None: -- GitLab