summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clusterman/commands/node.py6
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"))