Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix generation of measurement table (#380)
Previously, when printing the measurements result table, one would initialize the `t.field_names` field to `[""]`. Later on `t.field_names` would be overwritten by the actual table column names, namely the servers under test. Each time one sets `t.field_names`, the `field_names` setter logic would run. https://github.com/jazzband/prettytable/blob/1f156f8f82a8442fcec332018de0d66fa308acce/src/prettytable/prettytable.py#L605-L608 Among this is `validate_field_names`, which asserts that the number of fields from the second assignment equals the number of fields of the first assignment. https://github.com/jazzband/prettytable/blob/1f156f8f82a8442fcec332018de0d66fa308acce/src/prettytable/prettytable.py#L411-L421 Initializing `t.field_names` with `[""]` is not neccessary. Thus, to prevent the above assertion from failing, this commit removes the initialization, fully depending on the actual assignment with the name of the servers under test.
- Loading branch information