Added formatter for list in the context of a dict

This commit is contained in:
tengqm
2015-01-26 17:31:42 +08:00
parent 74b110e77b
commit f15e206c27

View File

@@ -72,6 +72,10 @@ def json_formatter(js):
return jsonutils.dumps(js, indent=2, ensure_ascii=False)
def list_formatter(record):
return '\n'.join(record or [])
def print_list(objs, fields, formatters=None, sortby_index=0,
mixed_case_fields=None, field_labels=None):
# This wrapper is needed because sdk may yield a generator that will