lstautorta.utils.subprocess
Functions:
| Name | Description |
|---|---|
subprocess_run_and_raise_exception_on_error |
Run a subprocess, and print its output in case of error. |
subprocess_run_and_raise_exception_on_error
subprocess_run_and_raise_exception_on_error(sp_cmd, success_log_string=None, failure_log_string=None, error_level=CRITICAL, log_level=INFO)
Run a subprocess, and print its output in case of error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sp_cmd
|
list of str
|
The subprocess command. |
required |
success_log_string
|
str
|
String to log when the subprocess succeeds. Defaults value is None, nothing is logged. |
None
|
failure_log_string
|
str
|
String to log when the subprocess fails. Defaults value is None, nothing is logged. |
None
|
Raises:
| Type | Description |
|---|---|
ChildProcessError
|
If the subprocess returns a non-exit code. |