Skip to content

Commit 3f2bd41

Browse files
provide stderr for ssh commands
1 parent c587971 commit 3f2bd41

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

shuffle-tools/1.2.0/src/app.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2633,14 +2633,10 @@ def run_ssh_command(self, host, port, user_name, private_key_file_id, password,
26332633
try:
26342634
stdin, stdout, stderr = ssh_client.exec_command(str(command))
26352635

2636-
stderr_ouput = stderr.read().decode(errors='ignore')
2637-
2638-
if stderr_ouput:
2639-
return {"success": "true", "message": stderr_ouput}
26402636
except Exception as e:
26412637
return {"success":"false","message":str(e)}
26422638

2643-
return {"success":"true","output": stdout.read().decode(errors='ignore')}
2639+
return {"success":"true","output": stdout.read().decode(errors='ignore'), "error_log": stderr.read().decode(errors='ignore')}
26442640

26452641
def cleanup_ioc_data(self, input_data):
26462642
# Remove unecessary parts like { and }, quotes etc

0 commit comments

Comments
 (0)