Handle ImportError in version.opengl_vendor

Fixes #3698
This commit is contained in:
Florian Bruhin 2018-03-11 08:15:22 +01:00
parent 5f01c7e79a
commit d9f7d401c6
2 changed files with 16 additions and 1 deletions

View File

@ -15,6 +15,15 @@ breaking changes (such as renamed commands) can happen in minor releases.
// `Fixed` for any bug fixes.
// `Security` to invite users to upgrade in case of vulnerabilities.
v1.3.0 (unreleased)
-------------------
Fixed
~~~~~
- qutebrowser now starts properly when the PyQt5 QOpenGLFunctions package wasn't found.
v1.2.0
------

View File

@ -453,7 +453,13 @@ def opengl_vendor(): # pragma: no cover
vp = QOpenGLVersionProfile()
vp.setVersion(2, 0)
vf = ctx.versionFunctions(vp)
try:
vf = ctx.versionFunctions(vp)
except ImportError as e:
log.init.debug("opengl_vendor: Importing version functions "
"failed: {}".format(e))
return None
if vf is None:
log.init.debug("opengl_vendor: Getting version functions failed!")
return None