diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-27 13:34:49 +0200 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-27 13:34:49 +0200 |
| commit | 4066d4ff4575fcdd3decd50c31c465acbe368512 (patch) | |
| tree | 18fe4a61022ca50b5c76454e3916e89d46c63f47 | |
| parent | 22d11c304680ae04057ae34ae625f5e3113183ce (diff) | |
Minor changes
| -rw-r--r-- | clusterman/commands/node.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clusterman/commands/node.py b/clusterman/commands/node.py index ba26a08..dd50d5b 100644 --- a/clusterman/commands/node.py +++ b/clusterman/commands/node.py @@ -94,7 +94,9 @@ def exec(command): for ip in get_node_list(): print("----- Node {} -----".format(ip)) if len(key_path)>0: - print(subprocess.check_output(["ssh","-o", "StrictHostKeyChecking=no", "-i", CONF["ssh"]["key_path"],"{}@{}".format(user,ip), " ".join(command)])) + output=subprocess.check_output(["ssh","-o", "StrictHostKeyChecking=no", "-i", CONF["ssh"]["key_path"],"{}@{}".format(user,ip), " ".join(command)]) + print(output.decode("utf-8")) else: - print(subprocess.check_output(["ssh","-o", "StrictHostKeyChecking=no", "{}@{}".format(user,ip), " ".join(command)])) + output=subprocess.check_output(["ssh","-o", "StrictHostKeyChecking=no", "{}@{}".format(user,ip), " ".join(command)]) + print(output.decode("utf-8")) |
