augur.util_support.shell_command_runner module

class augur.util_support.shell_command_runner.ShellCommandRunner(cmd, *, raise_errors=False, extra_env=None)

Bases: object

Run the given command string via Bash with error checking.

TODO move to method docstrings Returns True if the command exits normally. Returns False if the command exits with failure and “raise_errors” is False (the default). When “raise_errors” is True, exceptions are rethrown.

If an extra_env mapping is passed, the provided keys and values are overlayed onto the default subprocess environment.

invoke_command()
property modified_env
static print_error(message)

Prints message to STDERR formatted with textwrap.dedent

print_error_message(error)
run()
property shell_args
property shell_executable
static signal_from_error(error)

Return the signal.Signals member for the subprocess.CalledProcessError.returncode of error, if any.