diff options
author | Florian Bruhin <git@the-compiler.org> | 2018-03-11 08:15:22 +0100 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2018-03-11 21:07:21 +0100 |
commit | 8a23b9113432a84fb84aeda9f3e314aec78b1963 (patch) | |
tree | 160f04d62e88577f91dd1e40805f56dfdf5244c9 | |
parent | 5f01c7e79a21722aa733efbc998dc80c4300b467 (diff) | |
download | qutebrowser-8a23b9113432a84fb84aeda9f3e314aec78b1963.tar.gz qutebrowser-8a23b9113432a84fb84aeda9f3e314aec78b1963.zip |
Handle ImportError in version.opengl_vendor
Fixes #3698
(cherry picked from commit d9f7d401c612706f08600225dd8ee3dbcb428b46)
-rw-r--r-- | doc/changelog.asciidoc | 9 | ||||
-rw-r--r-- | qutebrowser/utils/version.py | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 595373031..1550b3a09 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -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 ------ diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 65ceb576a..a49ccc1bc 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -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 |