Skip to content
Snippets Groups Projects
Commit ba4cc6a5 authored by Erik Reid's avatar Erik Reid
Browse files

fix header column formatting

parent 510a8b8f
No related branches found
No related tags found
No related merge requests found
......@@ -9,15 +9,11 @@ COMMUNITY_STRING = '0pBiFbD'
def write_row_csv(columns, header=False):
if header:
columns = [' '] + columns
print(','.join(columns))
def write_row_md(columns, header=False):
delimiter = '||' if header else '|'
if header:
columns = [' '] + columns
print(delimiter + delimiter.join(columns) + delimiter)
......@@ -85,9 +81,9 @@ def client_addresses(netconf_string, community):
yield ipaddress.ip_network(s, strict=False)
columns = [''] + COLLECTORS
columns = [' '] + COLLECTORS
write_row(columns, header=True)
columns = [''] + [ADDRESS[c] for c in COLLECTORS]
columns = [' '] + [ADDRESS[c] for c in COLLECTORS]
write_row(columns, header=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment