Skip to content

Commit 5d3b531

Browse files
authored
Merge pull request #447 from citrus-it/listH
pkg list - omit headers if there are no results
2 parents c22abac + 2c9ca4d commit 5d3b531

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,10 @@ def gen(meta=False):
756756
data = list(gen())
757757
fmt_str = calc_fmtstr(attrs, data)
758758
else:
759-
data = gen()
759+
data = list(gen())
760+
761+
if len(data) == 0:
762+
omit_headers = True
760763

761764
format_output(attrs, fields, data, output_format, fmt_str, omit_headers)
762765

0 commit comments

Comments
 (0)