[core] add debugging around click events
log commandline outputs and errors. allow input handlers to be configured as "waiting" for debugging purposes. see #628
This commit is contained in:
parent
02a80840a1
commit
a697500491
3 changed files with 16 additions and 5 deletions
|
@ -45,10 +45,12 @@ def execute(
|
|||
out, _ = proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
err = "{} exited with code {}".format(cmd, proc.returncode)
|
||||
logging.warning(err)
|
||||
if ignore_errors:
|
||||
return (proc.returncode, err) if return_exitcode else err
|
||||
raise RuntimeError(err)
|
||||
res = out.decode("utf-8")
|
||||
logging.debug(res)
|
||||
return (proc.returncode, res) if return_exitcode else res
|
||||
return (0, "") if return_exitcode else ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue