From aff8212818531db9ef0bb68187358f564091a7e8 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Wed, 29 May 2013 19:58:18 +0000 Subject: [PATCH] Fix #5231 --- salt/modules/xapi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/modules/xapi.py b/salt/modules/xapi.py index 6013dde0d1..0656c1f152 100644 --- a/salt/modules/xapi.py +++ b/salt/modules/xapi.py @@ -745,6 +745,7 @@ def vm_cputime(vm_=None): with _get_xapi_session() as xapi: def _info(vm_): host_rec = _get_record_by_label(xapi, 'VM', vm_) + host_cpus = len(host_rec['host_CPUs']) if host_rec is False: return False host_metrics = _get_metrics_record(xapi, 'VM', host_rec)