From 7daa80595d2b74dd38cb11c715574c2d4a59af90 Mon Sep 17 00:00:00 2001 From: Mitchell Allison <mitchellallison@me.com> Date: Mon, 5 Jan 2015 12:40:22 +0000 Subject: [PATCH] Fixes issue where pre-providing an answer on a machine with only one platform will throw a RuntimeError. --- pyopencl/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index ec948cc3..78abb3e6 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -818,8 +818,6 @@ def create_some_context(interactive=None, answers=None): if not platforms: raise Error("no platforms found") - elif len(platforms) == 1: - platform, = platforms else: if not answers: cc_print("Choose platform:") -- GitLab