From 28c1833601f433d5b5dee840192a7bb4c3d36f4d Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 27 Oct 2023 14:18:57 +0200 Subject: Minor changes --- clusterman/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clusterman/__main__.py') diff --git a/clusterman/__main__.py b/clusterman/__main__.py index d22786b..be2ea22 100644 --- a/clusterman/__main__.py +++ b/clusterman/__main__.py @@ -20,6 +20,7 @@ def main(): node_cmd_list.add_argument("-g", "--group" ,help="Group to list") # Exec node_cmd_list=node_subparsers.add_parser("exec") + node_cmd_list.add_argument("-g", "--group" ,help="Group to run the command on") node_cmd_list.add_argument("cmd",help="Command to run",nargs=argparse.REMAINDER) ##### Frontend commands ##### @@ -58,7 +59,10 @@ def main(): else: node.ls() elif args.command == "exec": - node.exec(args.cmd) + if args.group: + node.exec(args.cmd,args.group) + else: + node.exec(args.cmd) else: target_node.print_help(sys.stderr) sys.exit(1) -- cgit v1.2.3