From 342f3a143f27b380bf5203a8cc9e2b6ec82a0784 Mon Sep 17 00:00:00 2001 From: Mykola F <37578614+mykolaf@users.noreply.github.com> Date: Tue, 8 Oct 2019 19:24:02 +0300 Subject: [PATCH] [intfstat,portstat] fix table_as_json (#691) Signed-off-by: Mykola Faryma --- scripts/intfstat | 2 +- scripts/portstat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/intfstat b/scripts/intfstat index 0bf9a4712e70..a1e9c682588f 100755 --- a/scripts/intfstat +++ b/scripts/intfstat @@ -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') diff --git a/scripts/portstat b/scripts/portstat index 3ba57caa5416..be5cbbed25b4 100755 --- a/scripts/portstat +++ b/scripts/portstat @@ -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')