raise ImportError if interface does not exists

This commit is contained in:
iLLiCiTiT 2021-11-11 18:20:09 +01:00
parent 9a74a6a1e8
commit b09382bf8d

View file

@ -107,12 +107,9 @@ class _InterfacesClass(_ModuleClass):
if attr_name in ("__path__", "__file__"):
return None
# Fake Interface if is not missing
self.__attributes__[attr_name] = type(
attr_name,
(MissingInteface, ),
{}
)
raise ImportError((
"cannot import name '{}' from 'openpype_interfaces'"
).format(attr_name))
return self.__attributes__[attr_name]