mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04: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
|
level = 0
|
||||||
|
|
||||||
if 'PyQt4' in name:
|
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)
|
mod = _builtin_import(name, globals, locals, fromlist, level)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user