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
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user