Commit d1b3c698 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added instruction to obtain the exit code of the command.

parent 32aab7af
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5,8 +5,10 @@ client.load_system_host_keys()
client.connect("localhost", 2022, "root", "ibm")
stdin, stdout, stderr = client.exec_command("eeadm task list --json")

output = stdout.readlines()
exitCode = stdout.channel.recv_exit_status()
print(exitCode)

output = stdout.readlines()
print(output[0].rstrip('\n'))

client.close()