Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- result = remote_command_runner_util.CommandRunner(command, host, user).execute()
- import pipes, shlex
- if hasattr(pipes, 'quote'):
- quote = pipes.quote # Python 2
- else:
- quote = shlex.quote # Python 3
- def executeCommand(argv, host, user):
- cmd_str = (' '.join(quote(arg) for arg in argv))
- return remote_command_runner_util.CommandRunner(cmd_str, host, user).execute()
- executeCommand(['java', '-jar', '/path/to/remote.jar', 'com.test.helloWorld'], host, user)
Add Comment
Please, Sign In to add comment