templates: When a subprocess fatally errors, output its stderr directly
Right now we dump all subprocess output to `program.log`. Unfortunately, The pungi/koji stack doesn't know how to scrape out the lorax logs. And even when running interactively, it's annoying that *some* fatal errors show up on stderr, but if it's from a subprocess, I need to go over and `tail program.log`. Let's output the subprocess stderr directly, since the user is going to want it prominently anyways.
This commit is contained in:
parent
359b78385f
commit
5aa6fea8c3
@ -518,8 +518,8 @@ class LoraxTemplateRunner(object):
|
|||||||
logger.debug("command finished successfully")
|
logger.debug("command finished successfully")
|
||||||
except CalledProcessError as e:
|
except CalledProcessError as e:
|
||||||
if e.output:
|
if e.output:
|
||||||
logger.debug('command output:\n%s', e.output)
|
logger.error('command output:\n%s', e.output)
|
||||||
logger.debug('command returned failure (%d)', e.returncode)
|
logger.error('command returned failure (%d)', e.returncode)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def installpkg(self, *pkgs):
|
def installpkg(self, *pkgs):
|
||||||
|
Loading…
Reference in New Issue
Block a user