project-receptor / python-receptor

Project Receptor is a flexible multi-service relayer with remote execution and orchestration capabilities linking controllers with executors across a mesh of nodes.
Other
32 stars 21 forks source link

Better CLI usage information output #196

Open elyezer opened 4 years ago

elyezer commented 4 years ago

Running receptor with no subcommand raises the following:

$ receptor
ERROR 2020-03-30 16:33:45,492  __main__ main: an error occured while running receptor
Traceback (most recent call last):
  File "/home/elyezer/code/receptor/receptor/receptor/__main__.py", line 63, in main
    config.go()
  File "/home/elyezer/code/receptor/receptor/receptor/config.py", line 535, in go
    "you must specify a subcommand (%s)." % (", ".join(SUBCOMMAND_EXTRAS.keys()),)
receptor.exceptions.ReceptorRuntimeError: you must specify a subcommand (node, ping, send, status).

It would be better if receptor, as others CLI tools, provided the usage information if the minimum expected options/subcommands were not provided.