Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
more informative error message
- Loading branch information
Showing
with
3 additions
and
1 deletion.
-
+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) |
|
|
|
|
|