From 4e1ebc290b6f2a268d210dec85bcfb33851dea32 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 2 Oct 2017 09:06:29 -0400 Subject: [PATCH] Fix noderun when invalid noderange passed exitcode was not yet set when starting to be referenced. Initialize to zero prior to any possible reference to fix. --- confluent_client/bin/noderun | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_client/bin/noderun b/confluent_client/bin/noderun index 4487c1ac..02e22eac 100755 --- a/confluent_client/bin/noderun +++ b/confluent_client/bin/noderun @@ -56,6 +56,7 @@ def run(): all = set([]) pipedesc = {} pendingexecs = deque() + exitcode = 0 for exp in c.create('/noderange/{0}/attributes/expression'.format(args[0]), {'expression': cmdstr}): @@ -71,7 +72,6 @@ def run(): run_cmdv(node, cmdv, all, pipedesc) else: pendingexecs.append((node, cmdv)) - exitcode = 0 if not all or exitcode: sys.exit(exitcode) rdy, _, _ = select.select(all, [], [], 10)