Python 3: fix format_nested_list_of_dict()
In this function, we mean to add actual values, not a map object. In Python 2, map() did not return a map object, so this worked as expected, but not in Python3. Change-Id: Icc6467b7846d62c189765fdfd9dce1e30db7eb55
This commit is contained in:
@@ -78,7 +78,7 @@ def format_nested_list_of_dict(l, column_names):
|
||||
header=True, hrules=prettytable.FRAME,
|
||||
field_names=column_names)
|
||||
for d in l:
|
||||
pt.add_row(map(lambda k: d[k], column_names))
|
||||
pt.add_row(list(map(lambda k: d[k], column_names)))
|
||||
return pt.get_string()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user