From 2c9ca4ddc6b219d51829c335d27e3355606bb050 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Mon, 18 Sep 2023 12:53:23 +0000 Subject: [PATCH] pkg list - omit headers if there are no results --- src/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client.py b/src/client.py index 2275dd111..a36b6d587 100755 --- a/src/client.py +++ b/src/client.py @@ -756,7 +756,10 @@ def gen(meta=False): data = list(gen()) fmt_str = calc_fmtstr(attrs, data) else: - data = gen() + data = list(gen()) + + if len(data) == 0: + omit_headers = True format_output(attrs, fields, data, output_format, fmt_str, omit_headers)