diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-27 14:18:57 +0200 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-27 14:18:57 +0200 |
| commit | 28c1833601f433d5b5dee840192a7bb4c3d36f4d (patch) | |
| tree | 19e50a9d5638bde16c7243e295157268043999a1 /clusterman/__main__.py | |
| parent | eb41b0b49a4d698bb264e5f7e280d8349eba2344 (diff) | |
Minor changes
Diffstat (limited to 'clusterman/__main__.py')
| -rw-r--r-- | clusterman/__main__.py | 6 |
1 files changed, 5 insertions, 1 deletions
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) |
