diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2016-11-06 19:53:49 +0200 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2016-11-06 19:53:49 +0200 |
commit | a053b815312c0d8eadf6f42b47ddd6edbe1e4fb8 (patch) | |
tree | ed03f79c0b2a2b62846e734c4aee78bbc8613e40 /bin | |
parent | e4f8044520215ed74aa58966b750a80769c16342 (diff) |
Fix beautify when output headers exist
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/q | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1412,7 +1412,11 @@ class QOutputPrinter(object): # If the user requested beautifying the output if self.output_params.beautify: - max_lengths = determine_max_col_lengths(data,self.output_field_quoting_func,self.output_params.delimiter) + if self.output_params.output_header: + data_with_possible_headers = data + [tuple(results.metadata.output_column_name_list)] + else: + data_with_possible_headers = data + max_lengths = determine_max_col_lengths(data_with_possible_headers,self.output_field_quoting_func,self.output_params.delimiter) if self.output_params.formatting: formatting_dict = dict( |