Loading app/main.py +4 −3 Original line number Diff line number Diff line Loading @@ -55,9 +55,10 @@ class MyHandler(BaseHTTPRequestHandler): temp_file.flush() temp_file.close() ftp.close() channel = ssh.exec_command('cat ' + temp_file_name + ' | /usr/local/bin/wrapper.sh') print(channel.read()) print(f'exit code: {channel.recv_exit_status()}') stdin, stdout, stderr = ssh.exec_command('cat ' + temp_file_name + ' | /usr/local/bin/wrapper.sh') print(stdout.read()) print(stderr.read()) print(f'exit code: {stdout.channel.recv_exit_status()}') # TODO: check exit code, handle errors # TODO: commented for now to check the file #ssh.exec_command('rm ' + temp_file_name) Loading Loading
app/main.py +4 −3 Original line number Diff line number Diff line Loading @@ -55,9 +55,10 @@ class MyHandler(BaseHTTPRequestHandler): temp_file.flush() temp_file.close() ftp.close() channel = ssh.exec_command('cat ' + temp_file_name + ' | /usr/local/bin/wrapper.sh') print(channel.read()) print(f'exit code: {channel.recv_exit_status()}') stdin, stdout, stderr = ssh.exec_command('cat ' + temp_file_name + ' | /usr/local/bin/wrapper.sh') print(stdout.read()) print(stderr.read()) print(f'exit code: {stdout.channel.recv_exit_status()}') # TODO: check exit code, handle errors # TODO: commented for now to check the file #ssh.exec_command('rm ' + temp_file_name) Loading