Skip to content

Commit

Permalink
[intfstat,portstat] fix table_as_json (#691)
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Faryma <[email protected]>
  • Loading branch information
mykolaf authored and lguohan committed Oct 8, 2019
1 parent 5564d87 commit 342f3a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/intfstat
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Intfstat(object):
ns_prate(cntr.tx_p_ok, old_cntr.tx_p_ok, time_gap),
ns_diff(cntr.tx_p_err, old_cntr.tx_p_err)))
if use_json:
print self.table_as_json(table, header)
print table_as_json(table, header)
else:
print tabulate(table, header, tablefmt='simple', stralign='right')

Expand Down
2 changes: 1 addition & 1 deletion scripts/portstat
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class Portstat(object):
ns_diff(cntr.tx_ovr, old_cntr.tx_ovr)))

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

0 comments on commit 342f3a1

Please sign in to comment.