Skip to content
Permalink
Browse files

more informative error message

  • Loading branch information
mbernasocchi authored and nyalldawson committed Jun 28, 2018
1 parent dbac3b4 commit 96764beff2c9e6c2dcfcaeee1956a38708ee1743
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/utils.py
@@ -667,7 +667,9 @@ def _import(name, globals={}, locals={}, fromlist=[], level=None):
level = 0

if 'PyQt4' in name:
raise ImportError('Cannot import PyQt4 classes - this would cause a crash!')
msg = 'Importing PyQt4 classes would cause a crash, ' \
'please use PyQt5 in "{}"'.format(name)
raise ImportError(msg)

mod = _builtin_import(name, globals, locals, fromlist, level)

0 comments on commit 96764be

Please sign in to comment.
You can’t perform that action at this time.