mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
do not crash of failed calling of 'cli' method
This commit is contained in:
parent
bf9d4442ea
commit
887e4ba004
1 changed files with 10 additions and 1 deletions
|
|
@ -47,9 +47,18 @@ class PypeCommands:
|
|||
from openpype.modules import ModulesManager
|
||||
|
||||
manager = ModulesManager()
|
||||
log = PypeLogger.get_logger("AddModulesCLI")
|
||||
for module in manager.modules:
|
||||
if hasattr(module, "cli"):
|
||||
module.cli(click_func)
|
||||
try:
|
||||
module.cli(click_func)
|
||||
|
||||
except Exception:
|
||||
log.warning(
|
||||
"Failed to add cli command for module \"{}\"".format(
|
||||
module.name
|
||||
)
|
||||
)
|
||||
return click_func
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue