(cmd, cwd=None, quiet=False)
| 472 | |
| 473 | |
| 474 | def run(cmd, cwd=None, quiet=False): |
| 475 | debug_print(f'run(cmd={cmd}, cwd={cwd})') |
| 476 | process = subprocess.Popen(cmd, cwd=cwd, env=os.environ.copy()) |
| 477 | process.communicate() |
| 478 | if process.returncode != 0 and not quiet: |
| 479 | errlog(f'{cmd} failed with error code {process.returncode}') |
| 480 | return process.returncode |
| 481 | |
| 482 | |
| 483 | # http://pythonicprose.blogspot.fi/2009/10/python-extract-targz-archive.html |
no test coverage detected