(self, parsed_args, parsed_globals)
| 241 | ] |
| 242 | |
| 243 | def _run_main_command(self, parsed_args, parsed_globals): |
| 244 | master_dns = sshutils.validate_and_find_master_dns( |
| 245 | session=self._session, |
| 246 | parsed_globals=parsed_globals, |
| 247 | cluster_id=parsed_args.cluster_id, |
| 248 | ) |
| 249 | |
| 250 | key_file = parsed_args.key_pair_file |
| 251 | sshutils.validate_scp_with_key_file(key_file) |
| 252 | if emrutils.which('scp') or emrutils.which('scp.exe'): |
| 253 | ssh_options = _build_ssh_options(parsed_args.ssh_options) |
| 254 | command = ['scp', '-r'] + ssh_options + [ |
| 255 | '-i', parsed_args.key_pair_file, |
| 256 | parsed_args.src, |
| 257 | constants.SSH_USER + '@' + master_dns, |
| 258 | ] |
| 259 | else: |
| 260 | if parsed_args.ssh_options: |
| 261 | sys.stderr.write(PUTTY_SSH_OPTIONS_MSG) |
| 262 | command = [ |
| 263 | 'pscp', '-scp', '-r', '-i', parsed_args.key_pair_file, |
| 264 | parsed_args.src, constants.SSH_USER + '@' + master_dns, |
| 265 | ] |
| 266 | |
| 267 | if parsed_args.dest: |
| 268 | command[-1] = command[-1] + ":" + parsed_args.dest |
| 269 | else: |
| 270 | command[-1] = command[-1] + ":" + parsed_args.src.split('/')[-1] |
| 271 | print(' '.join(command)) |
| 272 | rc = subprocess.call(command) |
| 273 | return rc |
| 274 | |
| 275 | |
| 276 | class Get(Command): |
nothing calls this directly
no test coverage detected