2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Fix csv output mode of nodediscover list

The changes made for tabulator broke csv output, fix that back.
This commit is contained in:
Jarrod Johnson 2018-11-06 15:33:04 -05:00
parent 0aa0289b06
commit bd5032268e

View File

@ -182,13 +182,16 @@ def import_csv(options, session):
def list_discovery(options, session):
outhandler = None
if options.csv:
csv.writer(sys.stdout).writerow(columns)
else:
outhandler = client.Tabulator(columns)
for mac in list_matching_macs(options, session):
print_disco(options, session, mac, outhandler)
print(outhandler.get_table())
if outhandler:
for row in outhandler.get_table():
print(row)
def clear_discovery(options, session):
for mac in list_matching_macs(options, session):