aiven-client icon indicating copy to clipboard operation
aiven-client copied to clipboard

Output error on empty resultset

Open aiven-amartin opened this issue 2 years ago • 1 comments

What happened?

If the pretty module is called with headers, but without any results having a value for a given header, it errors out as no width is calculated (see https://github.com/aiven/aiven-client/blob/3934dd6c80d398867bc1490936f17309d03104c9/aiven/client/pretty.py#L147).

What did you expect to happen?

Column printed with just the width of the header value.

What else do we need to know?

Include your platform, version, and any other information that seems relevant.

aiven-amartin avatar Sep 19 '22 14:09 aiven-amartin

The problem with this is that if there is e.g. typo, it is silently ignored and dummy empty field stays around as long as it does. Failing with correct error message would be perhaps better.

fingon avatar Sep 19 '22 14:09 fingon