Takes a list of str, and runs it as a subprocess.
(command)
| 9 | |
| 10 | |
| 11 | def job(command): |
| 12 | """Takes a list of str, and runs it as a subprocess.""" |
| 13 | command_line = " ".join(command) |
| 14 | logging.debug(f"Running '{command_line}'\n") |
| 15 | res = subprocess.run(command, check=True, stderr=subprocess.PIPE, |
| 16 | universal_newlines=True).stderr |
| 17 | logging.debug(f"Command '{command_line} output:\n'{res}'") |
| 18 | |
| 19 | |
| 20 | if __name__ == "__main__": |