Add cast of cpuload to a float

This commit is contained in:
Joshua Boniface 2018-07-18 21:36:45 -04:00
parent 87bf47c6d0
commit c90e865aa6
1 changed files with 1 additions and 1 deletions

2
pvc.py
View File

@ -414,7 +414,7 @@ def findTargetHypervisorLoad(zk_conn, dom_uuid):
hypervisor_list = getHypervisors(zk_conn, dom_uuid)
for hypervisor in hypervisor_list:
load = int(zk_conn.get('/nodes/{}/cpuload'.format(hypervisor))[0].decode('ascii'))
load = float(zk_conn.get('/nodes/{}/cpuload'.format(hypervisor))[0].decode('ascii'))
if load < least_load:
least_load = load