Skip to content

Commit

Permalink
[portstat] fix header used (#743)
Browse files Browse the repository at this point in the history
* [portstat] fix header used

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>

* [portstat] fix print table_as_json

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>

* Fix tx_ovr field
  • Loading branch information
mykolaf authored and abdosi committed Jan 21, 2020
1 parent 72f0e77 commit af9cbc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/portstat
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ class Portstat(object):


if use_json:
table_as_json(table, header_all if print_all else header)
print table_as_json(table, header_all if print_all else header)
else:
print tabulate(table, header_all, tablefmt='simple', stralign='right') # if print_all else header
print tabulate(table, header_all if print_all else header, tablefmt='simple', stralign='right')

def cnstat_diff_print(self, cnstat_new_dict, cnstat_old_dict, use_json, print_all):
"""
Expand Down Expand Up @@ -208,7 +208,7 @@ class Portstat(object):
STATUS_NA,
cntr.tx_err,
cntr.tx_drop,
cntr.tx_err))
cntr.tx_ovr))
else:
if old_cntr is not None:
table.append((key, self.get_port_state(key),
Expand Down Expand Up @@ -237,7 +237,7 @@ class Portstat(object):
STATUS_NA,
cntr.tx_err,
cntr.tx_drop,
cntr.tx_err))
cntr.tx_ovr))

if use_json:
print table_as_json(table, header)
Expand Down

0 comments on commit af9cbc8

Please sign in to comment.