2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-13 17:19:29 +00:00

Improve noderun message when command not found

Rather than raise an ominous looking trace, simply
state that thte command was not found and continue.
This commit is contained in:
Jarrod Johnson 2022-01-26 11:35:43 -05:00
parent effaba9661
commit 2bc080f4e0

View File

@ -131,8 +131,14 @@ def run():
def run_cmdv(node, cmdv, all, pipedesc):
nopen = subprocess.Popen(
cmdv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
try:
nopen = subprocess.Popen(
cmdv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError as e:
if e.errno == 2:
sys.stderr.write('{0}: Unable to find local executable file "{1}"'.format(node, cmdv[0]))
return
raise
pipedesc[nopen.stdout] = {'node': node, 'popen': nopen,
'type': 'stdout'}
pipedesc[nopen.stderr] = {'node': node, 'popen': nopen,