From 56efcbe981b3f09dc563e2519315a7d7432bbce4 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Tue, 25 Oct 2016 21:03:09 -0700 Subject: [PATCH] Workaround for pyopengl import error --- pyqtgraph/widgets/RawImageWidget.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/widgets/RawImageWidget.py b/pyqtgraph/widgets/RawImageWidget.py index 970b570b..35f12e8a 100644 --- a/pyqtgraph/widgets/RawImageWidget.py +++ b/pyqtgraph/widgets/RawImageWidget.py @@ -3,7 +3,9 @@ try: from ..Qt import QtOpenGL from OpenGL.GL import * HAVE_OPENGL = True -except ImportError: +except Exception: + # Would prefer `except ImportError` here, but some versions of pyopengl generate + # AttributeError upon import HAVE_OPENGL = False from .. import functions as fn