Cast numbers to strings for length

This commit is contained in:
Joshua Boniface 2019-12-25 13:47:46 -05:00
parent 1f6f486b3b
commit 8a0a278fe9
1 changed files with 3 additions and 3 deletions

View File

@ -307,15 +307,15 @@ def format_list(node_list):
if _domain_state_length > domain_state_length: if _domain_state_length > domain_state_length:
domain_state_length = _domain_state_length domain_state_length = _domain_state_length
# domains_count column # domains_count column
_domains_count_length = len(node_information['domains_count']) + 1 _domains_count_length = len(str(node_information['domains_count'])) + 1
if _domains_count_length > domains_count_length: if _domains_count_length > domains_count_length:
domains_count_length = _domains_count_length domains_count_length = _domains_count_length
# cpu_count column # cpu_count column
_cpu_count_length = len(node_information['cpu_count']) + 1 _cpu_count_length = len(str(node_information['cpu_count'])) + 1
if _cpu_count_length > cpu_count_length: if _cpu_count_length > cpu_count_length:
cpu_count_length = _cpu_count_length cpu_count_length = _cpu_count_length
# load column # load column
_load_length = len(node_information['load']) + 1 _load_length = len(str(node_information['load'])) + 1
if _load_length > load_length: if _load_length > load_length:
load_length = _load_length load_length = _load_length
# mem_total column # mem_total column