diff --git a/cinderclient/utils.py b/cinderclient/utils.py index f9c65661d..558c29221 100644 --- a/cinderclient/utils.py +++ b/cinderclient/utils.py @@ -143,7 +143,8 @@ def print_list(objs, fields, formatters={}): row.append(data) pt.add_row(row) - print strutils.safe_encode(pt.get_string(sortby=fields[0])) + if len(objs) > 0: + print strutils.safe_encode(pt.get_string(sortby=fields[0])) def print_dict(d, property="Property"):