ArtFXDev/silex_client

Better error message when giving an action without the category

Closed this issue · 0 comments

When trying to execute an action without the -c category argument:

$ rez env silex_client-dev -- silex action tester
[SILEX]    [211222 15:40:15] ERROR     |    [config.resolve_config] Could not resolve the action tester: The action does not exists (106)
Traceback (most recent call last):
  File "/home/josephhenry/rez_packages/python/3.7.9/platform-linux/arch-64bit/os-Pop-21.10/python/lib/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/josephhenry/rez_packages/python/3.7.9/platform-linux/arch-64bit/os-Pop-21.10/python/lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/josephhenry/rez_packages/silex/silex-rez/packages/silex/silex_client/dev.0.1.0/silex_client/cli/parser.py", line 140, in <module>
    main()
  File "/home/josephhenry/rez_packages/silex/silex-rez/packages/silex/silex_client/dev.0.1.0/silex_client/cli/parser.py", line 136, in main
    HANDLERS_MAPPING[subcommand](**args)
  File "/home/josephhenry/rez_packages/silex/silex-rez/packages/silex/silex_client/dev.0.1.0/silex_client/cli/handlers.py", line 48, in action_handler
    if not action.commands:
  File "/home/josephhenry/rez_packages/silex/silex-rez/packages/silex/silex_client/dev.0.1.0/silex_client/action/action_query.py", line 314, in commands
    return self.buffer.commands
AttributeError: 'ActionQuery' object has no attribute 'buffer'