From bf3cccfe561cec432687070b6a4220f72ede79f0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 5 Sep 2016 18:15:30 +0200 Subject: [PATCH] Make QWebPage import in commands.py optional --- qutebrowser/browser/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index e2a126d58..1a6c2b718 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -28,7 +28,10 @@ from PyQt5.QtWidgets import QApplication, QTabBar from PyQt5.QtCore import Qt, QUrl, QEvent from PyQt5.QtGui import QKeyEvent from PyQt5.QtPrintSupport import QPrintDialog, QPrintPreviewDialog -from PyQt5.QtWebKitWidgets import QWebPage +try: + from PyQt5.QtWebKitWidgets import QWebPage +except ImportError: + QWebPage = None try: from PyQt5.QtWebEngineWidgets import QWebEnginePage except ImportError: