mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
wrap 'get_containers' to try except
This commit is contained in:
parent
a0cb4a25e0
commit
8b18196980
1 changed files with 12 additions and 4 deletions
|
|
@ -348,10 +348,18 @@ class LoaderController(BackendLoaderController, FrontendLoaderController):
|
|||
return set()
|
||||
|
||||
if not self._loaded_products_cache.is_valid:
|
||||
if isinstance(self._host, ILoadHost):
|
||||
containers = self._host.get_containers()
|
||||
else:
|
||||
containers = self._host.ls()
|
||||
try:
|
||||
if isinstance(self._host, ILoadHost):
|
||||
containers = self._host.get_containers()
|
||||
else:
|
||||
containers = self._host.ls()
|
||||
|
||||
except BaseException:
|
||||
self.log.error(
|
||||
"Falied to collect loaded products.", exc_info=True
|
||||
)
|
||||
containers = []
|
||||
|
||||
repre_ids = set()
|
||||
for container in containers:
|
||||
repre_id = container.get("representation")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue