mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Handle calling 'yunohost' with no args more gracefully
This commit is contained in:
parent
9fc33eec1a
commit
4c03e16de9
1 changed files with 6 additions and 0 deletions
|
@ -412,6 +412,9 @@ class ActionsMapParser(BaseActionsMapParser):
|
|||
else:
|
||||
_p = _p._actions[1]
|
||||
|
||||
if tid == []:
|
||||
return None
|
||||
|
||||
raise MoulinetteError(f"Authentication undefined for {tid} ?", raw_msg=True)
|
||||
|
||||
def parse_args(self, args, **kwargs):
|
||||
|
@ -497,6 +500,9 @@ class Interface:
|
|||
if output_as and output_as not in ["json", "plain", "none"]:
|
||||
raise MoulinetteValidationError("invalid_usage")
|
||||
|
||||
if not args:
|
||||
raise MoulinetteValidationError("invalid_usage")
|
||||
|
||||
try:
|
||||
ret = self.actionsmap.process(args, timeout=timeout)
|
||||
except (KeyboardInterrupt, EOFError):
|
||||
|
|
Loading…
Reference in a new issue