mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
raise ImportError if interface does not exists
This commit is contained in:
parent
9a74a6a1e8
commit
b09382bf8d
1 changed files with 3 additions and 6 deletions
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue