Skip to content

Commit 3fcd32d

Browse files
authored
Merge pull request #64 from mwcraig/no-qt-win
Add explicit error if the browser is set to qt on windows
2 parents 3cea53f + 6d4dba9 commit 3fcd32d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

vpython/no_notebook.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,15 @@ def onClose(self, wasClean, code, reason):
240240
pass
241241

242242

243-
if platform.python_implementation() == 'PyPy' and _browsertype == 'pyqt':
244-
raise RuntimeError('The pyqt browser cannot be used PyPy. Please use '
245-
'the default browser instead by removing '
246-
'set_browser("pyqt") from your code.')
243+
if _browsertype == 'pyqt':
244+
if platform.python_implementation() == 'PyPy':
245+
raise RuntimeError('The pyqt browser cannot be used PyPy. Please use '
246+
'the default browser instead by removing '
247+
'set_browser("pyqt") from your code.')
248+
elif sys.platform.startswith('win'):
249+
raise RuntimeError('The pyqt browser cannot be used on Windows. '
250+
'Please use the default browser instead by '
251+
'removing set_browser("pyqt") from your code.')
247252

248253

249254
def start_Qapp(port):

0 commit comments

Comments
 (0)