We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`p = Protocol( endpoint=http_request+'://'+ip+':'+port+'/wsman', transport=transport_type, username=usr, password=passwrd, ca_trust_path="httpscert.cert", `server_cert_validation=isvalidation)`` # execute command by using command_id and shell_id try: shell_id = p.open_shell() command_id = p.run_command(shell_id, cmd) std_out, std_err, status_code = p.get_command_output( shell_id, command_id) # p.cleanup_command(shell_id, command_id) # p.close_shell(shell_id) file_status = status_code file_output = std_out +bytes(ANY_ERROR,UTF8) + std_err # if excpetion happend log exception with status code except Exception as exception: excp = (ANY_ERROR+'Exception:%s:%s' % (exception.__class__.__name__, exception)) file_output = bytes(excp,UTF8) finally: p.cleanup_command(shell_id, command_id) p.close_shell(shell_id) # convert final output as bytes file_ip_bytes = bytes("windows:"+ip+"\n", UTF8) file_status_bytes = bytes("status_code:"+str(file_status)+"\n",UTF8) sep_bytes = bytes(FINAL_OUTPUT, UTF8) file_output = file_ip_bytes+file_status_bytes+sep_bytes+file_output Writing into file and close.
Calling above python process from go. Initially it is consuming 28mb memory consumption increasing slowly
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Calling above python process from go. Initially it is consuming 28mb memory consumption increasing slowly
The text was updated successfully, but these errors were encountered: