From a24866c2df2046ba29933af94f60e7c49e6e96d7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 31 Jan 2020 08:22:20 -0500 Subject: [PATCH] Fix exitcode for confetty noderange commands The exitcode was not being set for noderange commands where each node may independently raise errors. Correct the oversight by catching each subelements errors. --- confluent_client/bin/confetty | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_client/bin/confetty b/confluent_client/bin/confetty index 3844f6b8..e4e30e6d 100755 --- a/confluent_client/bin/confetty +++ b/confluent_client/bin/confetty @@ -299,8 +299,11 @@ currchildren = None def print_result(res): + global exitcode if 'errorcode' in res or 'error' in res: print(res['error']) + if 'errorcode' in res: + exitcode |= res['errorcode'] return if 'databynode' in res: print_result(res['databynode'])