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