If pool checking is disabled with -o option the 'available' variable is
not set and referenced before assignment.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/SlavePool.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index baca1e7..22c4379 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -124,6 +124,8 @@ class SlavePool:
logging.debug("libvirtd not running. Removing "\
"libvirt_domain from machine '%s'"
% m_id)
del machine_spec['params']['libvirt_domain']
+ else:
+ available = True
if available:
self._pool[m_id] = machine_spec
--
1.8.3.1
Show replies by thread