(mcdir, *args)
| 360 | |
| 361 | |
| 362 | def _run_mc_command(mcdir, *args): |
| 363 | full_args = ['mc', '-C', mcdir] + list(args) |
| 364 | with subprocess.Popen(full_args, stdout=subprocess.PIPE, |
| 365 | stderr=subprocess.PIPE, encoding='utf-8') as proc: |
| 366 | retval = proc.wait(10) |
| 367 | cmd_str = ' '.join(full_args) |
| 368 | print(f'Cmd: {cmd_str}') |
| 369 | print(f' Return: {retval}') |
| 370 | print(f' Stdout: {proc.stdout.read()}') |
| 371 | print(f' Stderr: {proc.stderr.read()}') |
| 372 | if retval != 0: |
| 373 | raise ChildProcessError("Could not run mc") |
| 374 | |
| 375 | |
| 376 | def _configure_s3_limited_user(s3_server, policy, username, password): |
no test coverage detected