From e31bbc735318d65ed8e724e5256f7242cfea8a53 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Mon, 10 Feb 2014 17:05:58 +0100 Subject: [PATCH] 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 --- ceilometerclient/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceilometerclient/common/utils.py b/ceilometerclient/common/utils.py index 80635ba..2628ca0 100644 --- a/ceilometerclient/common/utils.py +++ b/ceilometerclient/common/utils.py @@ -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()