From c90e865aa654b505518bcad8aa02bc13d9f0f469 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Wed, 18 Jul 2018 21:36:45 -0400 Subject: [PATCH] Add cast of cpuload to a float --- pvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvc.py b/pvc.py index 88f3d073..e2ba6f83 100755 --- a/pvc.py +++ b/pvc.py @@ -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