Add some debug logging to early QWEW import

See #1640
This commit is contained in:
Florian Bruhin 2016-07-11 13:49:24 +02:00
parent 64dc099d51
commit 7e36884cbd

View File

@ -271,8 +271,13 @@ def maybe_import_webengine():
"""
try:
from PyQt5 import QtWebEngineWidgets # pylint: disable=unused-variable
except ImportError:
pass
except ImportError as e:
from qutebrowser.utils import log
from PyQt5.QtCore import QCoreApplication
log.init.debug("Failed to import QtWebEngineWidgets: {}".format(e))
if 'QCoreApplication' in str(e):
log.init.debug("QApplication instance: {}".format(
QCoreApplication.instance()))
def remove_inputhook():
@ -320,5 +325,5 @@ def earlyinit(args):
check_ssl_support()
remove_inputhook()
check_libraries()
maybe_import_webengine()
init_log(args)
maybe_import_webengine()