From 2bc080f4e0488ef92dab7d390fa72de303389782 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 26 Jan 2022 11:35:43 -0500 Subject: [PATCH] Improve noderun message when command not found Rather than raise an ominous looking trace, simply state that thte command was not found and continue. --- confluent_client/bin/noderun | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/noderun b/confluent_client/bin/noderun index b716b5ab..d859dc4b 100755 --- a/confluent_client/bin/noderun +++ b/confluent_client/bin/noderun @@ -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,