Support running qutebrowser without SSL.
This commit is contained in:
parent
bc380fca61
commit
7169d02609
@ -29,7 +29,10 @@ import collections
|
|||||||
|
|
||||||
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, qVersion
|
from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, qVersion
|
||||||
from PyQt5.QtWebKit import qWebKitVersion
|
from PyQt5.QtWebKit import qWebKitVersion
|
||||||
|
try:
|
||||||
from PyQt5.QtNetwork import QSslSocket
|
from PyQt5.QtNetwork import QSslSocket
|
||||||
|
except ImportError:
|
||||||
|
QSslSocket = None
|
||||||
|
|
||||||
import qutebrowser
|
import qutebrowser
|
||||||
from qutebrowser.utils import log, utils
|
from qutebrowser.utils import log, utils
|
||||||
@ -206,11 +209,15 @@ def version():
|
|||||||
'PyQt: {}'.format(PYQT_VERSION_STR),
|
'PyQt: {}'.format(PYQT_VERSION_STR),
|
||||||
]
|
]
|
||||||
lines += _module_versions()
|
lines += _module_versions()
|
||||||
|
|
||||||
|
if QSslSocket is not None and QSslSocket.supportsSsl():
|
||||||
|
ssl_version = QSslSocket.sslLibraryVersionString()
|
||||||
|
else:
|
||||||
|
ssl_version = 'unavailable'
|
||||||
lines += [
|
lines += [
|
||||||
'Webkit: {}'.format(qWebKitVersion()),
|
'Webkit: {}'.format(qWebKitVersion()),
|
||||||
'Harfbuzz: {}'.format(os.environ.get('QT_HARFBUZZ', 'system')),
|
'Harfbuzz: {}'.format(os.environ.get('QT_HARFBUZZ', 'system')),
|
||||||
'SSL: {}'.format(QSslSocket.sslLibraryVersionString() if
|
'SSL: {}'.format(ssl_version),
|
||||||
QSslSocket.supportsSsl() else 'unavailable'),
|
|
||||||
'',
|
'',
|
||||||
'Frozen: {}'.format(hasattr(sys, 'frozen')),
|
'Frozen: {}'.format(hasattr(sys, 'frozen')),
|
||||||
'Platform: {}, {}'.format(platform.platform(),
|
'Platform: {}, {}'.format(platform.platform(),
|
||||||
|
Loading…
Reference in New Issue
Block a user