Changed importError to ModuleNotFoundError
This commit is contained in:
parent
58844247f7
commit
3a2621158c
|
@ -225,7 +225,7 @@ def importorskip(
|
|||
warnings.simplefilter("ignore")
|
||||
try:
|
||||
__import__(modname)
|
||||
except ImportError as exc:
|
||||
except ModuleNotFoundError as exc:
|
||||
if reason is None:
|
||||
reason = f"could not import {modname!r}: {exc}"
|
||||
raise Skipped(reason, allow_module_level=True) from None
|
||||
|
|
Loading…
Reference in New Issue