Commit 61a21b5b authored by Hugh Brown's avatar Hugh Brown

Check exit code for subcommands; exit with error if needed

Signed-off-by: Hugh Brown's avatarHugh Brown (Saint Aardvark the Carpeted) <[email protected]>
parent 32645671
......@@ -143,6 +143,13 @@ def maybe_run(cmd=None, config=None, dry_run=False):
process_info =
log_batch_operation(config, full_cmd, process_info.returncode)
except subprocess.CalledProcessError:
LOGGER.warning("%s failed")
if config.batch_stop_at_first_failure is True:
LOGGER.critical("Batch configured to exit on failure")
def batch(config_file, dry_run):
"""Run polaris fetch and learn non-interactively, based on configuration file.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment