From 2787e1d8620113e847e1a29abf5d9f68e7ae39f3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 23 Jul 2019 11:57:35 -0400 Subject: [PATCH] Present more data about missing entries from assign csv When doing an assign on csv, present all the missing entries rather than stopping on the first. --- confluent_client/bin/nodediscover | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/confluent_client/bin/nodediscover b/confluent_client/bin/nodediscover index b7301623..c045f20c 100755 --- a/confluent_client/bin/nodediscover +++ b/confluent_client/bin/nodediscover @@ -154,6 +154,7 @@ def import_csv(options, session): for field in fields: if field in unique_fields: unique_data[field] = set([]) + broken = False for record in records: currfields = list(fields) nodedatum = {} @@ -170,14 +171,16 @@ def import_csv(options, session): nodedatum[currfield] = datum if not datum_complete(nodedatum): sys.exit(1) - if not search_record(nodedatum, options, session): + if not search_record(nodedatum, options, session) and not broken: blocking_scan(session) if not search_record(nodedatum, options, session): sys.stderr.write( "Could not match the following data: " + repr(nodedatum) + '\n') - sys.exit(1) + broken = True nodedata.append(nodedatum) + if broken: + sys.exit(1) for datum in nodedata: maclist = search_record(datum, options, session) datum = datum_to_attrib(datum)