Make it easier to find the output of failed commands in the log
...by adding a ^^^^^^^^... line right below the failed command's output.
This commit is contained in:
parent
8a40c245da
commit
9e9c5907ec
|
@ -45,6 +45,10 @@ def core(args, cmd, log_message, log, return_stdout, check=True):
|
||||||
|
|
||||||
except subprocess.CalledProcessError as exc:
|
except subprocess.CalledProcessError as exc:
|
||||||
if check:
|
if check:
|
||||||
|
if log:
|
||||||
|
logging.debug("^" * 70)
|
||||||
|
logging.info("NOTE: The failed command's output is above"
|
||||||
|
" the ^^^ line in the logfile: " + args.log)
|
||||||
raise RuntimeError("Command failed: " + log_message) from exc
|
raise RuntimeError("Command failed: " + log_message) from exc
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue