mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
added HostBase validation
This commit is contained in:
parent
2d341f6e55
commit
28eac4b18b
1 changed files with 6 additions and 1 deletions
|
|
@ -99,13 +99,18 @@ def registered_root():
|
|||
return _registered_root["_"]
|
||||
|
||||
|
||||
def install_host(host):
|
||||
def install_host(host: HostBase) -> None:
|
||||
"""Install `host` into the running Python session.
|
||||
|
||||
Args:
|
||||
host (HostBase): A host interface object.
|
||||
|
||||
"""
|
||||
if not isinstance(host, HostBase):
|
||||
log.error(
|
||||
f"Host must be a subclass of 'HostBase', got '{type(host)}'."
|
||||
)
|
||||
|
||||
global _is_installed
|
||||
|
||||
_is_installed = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue