From 8645839db2aecca314132604c4df9b615d2ffdc1 Mon Sep 17 00:00:00 2001 From: Abhishek Raut Date: Tue, 5 Apr 2016 23:15:16 -0700 Subject: [PATCH] [Admin-Util]: Fix tabulate results method If multiple entries are passed to tabulate results method, it errors out with TypeError since it is not able to format all string arguments. This patch fixes this method. Change-Id: Ibeb4e383690f812ccbf1225857d8da3068cfaeb5 Closes-Bug: #1567156 --- vmware_nsx/shell/admin/plugins/common/formatters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsx/shell/admin/plugins/common/formatters.py b/vmware_nsx/shell/admin/plugins/common/formatters.py index 28c66043b1..13873debb8 100644 --- a/vmware_nsx/shell/admin/plugins/common/formatters.py +++ b/vmware_nsx/shell/admin/plugins/common/formatters.py @@ -67,5 +67,5 @@ def tabulate_results(data): columns = data.pop(0) table = prettytable.PrettyTable(["%s" % col for col in columns]) for contents in data: - table.add_row(["%s" % contents]) + table.add_row(["%s" % col for col in contents]) return table