From 199a948b332b7bb88a003eabe92848a259b4b753 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 9 Nov 2018 08:32:28 -0500 Subject: [PATCH] Fix ordering without custom field list The order argument only had any meaning when used in custom fields. Add a loop in the custom field agnostic section of the code to correct the behavior. --- confluent_client/bin/nodediscover | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/nodediscover b/confluent_client/bin/nodediscover index c7cfce79..fab06fcf 100755 --- a/confluent_client/bin/nodediscover +++ b/confluent_client/bin/nodediscover @@ -203,10 +203,12 @@ def list_discovery(options, session): for cdt in columnmapping: if cdt.lower() == field.lower(): columns.append(cdt) - if options.order and options.order.lower() == cdt.lower(): - orderby = cdt else: columns = defcolumns + if options.order: + for field in columns: + if options.order.lower() == field.lower(): + orderby = field if options.csv: csv.writer(sys.stdout).writerow(columns) else: