mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
more informative error message
This commit is contained in:
parent
dbac3b4922
commit
96764beff2
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user