From 11258a06c21c8240820c6e14b3e44a92120d5889 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Fri, 29 Jun 2012 16:27:25 -0400 Subject: [PATCH] Don't call PrettyTable add_row with a tuple. Updates the print_dict function in utils.py so that it doesn't try to append a tuple with add_row. According to pydoc add_row should get passed a list (not a tuple): Arguments: row - row of data, should be a list with as many elements as the table has fields This fixes a TypeError which can occur with the existing code: TypeError: can only concatenate list (not "tuple") to list Fixes LP Bug #1019409. Change-Id: I16f745afa872106c3bc44c33d88db2a5aacd776c --- keystoneclient/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneclient/utils.py b/keystoneclient/utils.py index 863f03ea6..f5165dd0a 100644 --- a/keystoneclient/utils.py +++ b/keystoneclient/utils.py @@ -45,7 +45,7 @@ def print_dict(d): for (prop, value) in d.iteritems(): if value is None: value = '' - pt.add_row((prop, value)) + pt.add_row([prop, value]) print pt.get_string(sortby='Property')