Refactor subprocess calls
Currently, we use homemade execute()
, execute_no_errors()
, and get_command_string()
, which are all prone to errors. Instead, we should use various methods of subprocess
- supply command as a tuple of arguments. Do not run
str()
onPath
objects - use
text=True
to not bother with encoding and decoding - use
check_output
if we need stdout,check_call
if we don't