You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try:
the_class = self.routed_subcommands[args[0]] # the click.Group of the subcommand
...
function_to_call = the_class().run # calls the group's __call__, which calls it's main()
## This is not what is intended. For this type of command we want
## function_to_call = the_class
## Actually, the .run would lead to an AttributeError, except that click commands terminate
## with sys.exit() or raise an exception before execution gets there
except IndexError:
function_to_call = self.no_subcommand # Gotcha!
## If the click subcommand's main() raises an IndexError
except AttributeError:
function_to_call = self.invalid_subcommand # Gotcha!
## ditto for AttributeError
function_to_call(*args[1:])
## This will print "<subcmd> is an invalid subcommand ..."
## and then list <subcmd> as a valid subcommand
The text was updated successfully, but these errors were encountered:
in
aiida/cmdline/baseclass.py:131
:The text was updated successfully, but these errors were encountered: