eric6/Tools/webBrowserSupport.py

changeset 8243
cc717c2ae956
parent 7923
91e843545d9a
equal deleted inserted replaced
8242:aa713ac50c0d 8243:cc717c2ae956
10 It looks for QtWebEngine. It reports the variant found or the string 'None' if 10 It looks for QtWebEngine. It reports the variant found or the string 'None' if
11 it is absent. 11 it is absent.
12 """ 12 """
13 13
14 import sys 14 import sys
15 import contextlib
15 16
16 variant = "None" 17 variant = "None"
17 18
18 try: 19 with contextlib.suppress(ImportError):
19 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ 20 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
20 variant = "QtWebEngine" 21 variant = "QtWebEngine"
21 except ImportError:
22 pass
23 22
24 print(variant) # __IGNORE_WARNING_M801__ 23 print(variant) # __IGNORE_WARNING_M801__
25 24
26 sys.exit(0) 25 sys.exit(0)

eric ide

mercurial