openbmctool_execute_command: add "which" to find tool
Change-Id: Ic35addec64c4946de3d5de792a427d176b1c4c03
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/openbmctool_utils.py b/lib/openbmctool_utils.py
index ba12274..f78df35 100755
--- a/lib/openbmctool_utils.py
+++ b/lib/openbmctool_utils.py
@@ -80,9 +80,9 @@
pipeline.insert(1, "tail -n +1 | egrep -v 'Attempting login|User [^ ]+ has"
" been logged out'")
- command_string = "set -o pipefail ; python3 openbmctool.py -H " + openbmc_host\
- + " -U " + openbmc_username + " -P " + openbmc_password + " "\
- + " | ".join(pipeline)
+ command_string = "set -o pipefail ; python3 $(which openbmctool.py) -H "\
+ + openbmc_host + " -U " + openbmc_username + " -P " + openbmc_password\
+ + " " + " | ".join(pipeline)
return gc.shell_cmd(command_string, *args, **kwargs)