msuraev has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29426 )
Change subject: scripts/obs/*.py: log name of function calling command ......................................................................
scripts/obs/*.py: log name of function calling command
Change-Id: If4ccc0eb44da4ea743f3858b09c762ee6a138f1d --- M scripts/obs/lib/__init__.py 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve msuraev: Looks good to me, approved Jenkins Builder: Verified
diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py index a07a072..d66aa3b 100644 --- a/scripts/obs/lib/__init__.py +++ b/scripts/obs/lib/__init__.py @@ -7,6 +7,7 @@ import subprocess import sys import tempfile +import inspect import lib.config
cmds_verbose = False @@ -108,8 +109,9 @@ :param check: stop with error if exit code is not 0 """ global cmds_verbose
+ caller = inspect.stack()[2][3] if cmds_verbose: - print(f"+ {cmd}") + print(f"+ {caller}(): {cmd}")
with tempfile.TemporaryFile(encoding="utf8", mode="w+") as output_buf: p = subprocess.Popen(cmd, stdout=subprocess.PIPE,