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
If an argument specified in a tools config (the 'key' of the key/value pair) contains any uppercase characters in its name when run, even with valid CLI input, it will crash the system & print an ugly stack trace as so:
adminware> run cmd1 -n node dsadas sadsada
Traceback (most recent call last):
File "src/adminware", line 7, in <module>
adminware()
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/tmp/adminware/src/appliance_cli/sandbox.py", line 31, in sandbox
allow_internal_commands=False,
File "/tmp/adminware/venv/src/click-repl/click_repl/__init__.py", line 194, in repl
group.invoke(ctx)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/tmp/adminware/venv/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/tmp/adminware/src/appliance_cli/command_generation.py", line 136, in click_callback
params[arg_name] for arg_name in arguments.keys()
File "/tmp/adminware/src/appliance_cli/command_generation.py", line 136, in <listcomp>
params[arg_name] for arg_name in arguments.keys()
KeyError: 'INPUT'
This acts similarly for any uppercase chars; inpuT as a name would also error.
This is likely due to some down-casing before entry into the params dict resulting in a KeyError on attempted lookup.
This should either be fixed such that arguments with uppercase chars in their names are valid or such that the system errors in a much more graceful way, either on startup when the configs are loaded or when the tool's attempted to be ran.
The text was updated successfully, but these errors were encountered:
If an argument specified in a tools config (the 'key' of the key/value pair) contains any uppercase characters in its name when run, even with valid CLI input, it will crash the system & print an ugly stack trace as so:
This acts similarly for any uppercase chars;
inpuT
as a name would also error.This is likely due to some down-casing before entry into the
params
dict resulting in a KeyError on attempted lookup.This should either be fixed such that arguments with uppercase chars in their names are valid or such that the system errors in a much more graceful way, either on startup when the configs are loaded or when the tool's attempted to be ran.
The text was updated successfully, but these errors were encountered: