augur.io.shell_command_runner

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

Bases: object

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.

augur.io.shell_command_runner.run_shell_command(cmd, raise_errors=False, extra_env=None)

Run the given command string via Bash with error checking.

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.