diff options
Diffstat (limited to 'openstack/common/cliutils.py')
-rw-r--r-- | openstack/common/cliutils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openstack/common/cliutils.py b/openstack/common/cliutils.py index 96b4fedc..de57f02c 100644 --- a/openstack/common/cliutils.py +++ b/openstack/common/cliutils.py @@ -186,14 +186,15 @@ def print_list(objs, fields, formatters=None, sortby_index=0, print(encodeutils.safe_encode(pt.get_string(**kwargs))) -def print_dict(dct, dict_property="Property", wrap=0): +def print_dict(dct, dict_property="Property", wrap=0, dict_value='Value'): """Print a `dict` as a table of two columns. :param dct: `dict` to print :param dict_property: name of the first column :param wrap: wrapping for the second column + :param dict_value: header label for the value (second) column """ - pt = prettytable.PrettyTable([dict_property, 'Value']) + pt = prettytable.PrettyTable([dict_property, dict_value]) pt.align = 'l' for k, v in six.iteritems(dct): # convert dict to str to check length |