| Conditions | 3 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import subprocess |
||
| 10 | def execute_commands(cmds): |
||
| 11 | for cmd in cmds: |
||
| 12 | try: |
||
| 13 | logger.info(f"Running {cmd}") |
||
| 14 | out = subprocess.check_output(cmd, shell=True).decode("utf-8") |
||
| 15 | logger.info(out) |
||
| 16 | except subprocess.CalledProcessError as e: |
||
| 17 | raise RuntimeError( |
||
| 18 | f"Command {cmd} return with err {e.returncode} {e.output}" |
||
| 19 | ) |
||
| 34 |