Skip to content

Commit af9cbc8

Browse files
mykolafabdosi
authored andcommitted
[portstat] fix header used (sonic-net#743)
* [portstat] fix header used Signed-off-by: Mykola Faryma <[email protected]> * [portstat] fix print table_as_json Signed-off-by: Mykola Faryma <[email protected]> * Fix tx_ovr field
1 parent 72f0e77 commit af9cbc8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/portstat

+4-4
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ class Portstat(object):
155155

156156

157157
if use_json:
158-
table_as_json(table, header_all if print_all else header)
158+
print table_as_json(table, header_all if print_all else header)
159159
else:
160-
print tabulate(table, header_all, tablefmt='simple', stralign='right') # if print_all else header
160+
print tabulate(table, header_all if print_all else header, tablefmt='simple', stralign='right')
161161

162162
def cnstat_diff_print(self, cnstat_new_dict, cnstat_old_dict, use_json, print_all):
163163
"""
@@ -208,7 +208,7 @@ class Portstat(object):
208208
STATUS_NA,
209209
cntr.tx_err,
210210
cntr.tx_drop,
211-
cntr.tx_err))
211+
cntr.tx_ovr))
212212
else:
213213
if old_cntr is not None:
214214
table.append((key, self.get_port_state(key),
@@ -237,7 +237,7 @@ class Portstat(object):
237237
STATUS_NA,
238238
cntr.tx_err,
239239
cntr.tx_drop,
240-
cntr.tx_err))
240+
cntr.tx_ovr))
241241

242242
if use_json:
243243
print table_as_json(table, header)

0 commit comments

Comments
 (0)