This patch extends warning message printed when pool directory does not
contain any machines. Now it contains name of the pool and path to the
directory.
This will be used in list_pools implementation, where without this info
the message would not make sense as user wouldn't know which pool is
empty.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/SlavePool.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index 02715ed..638d6d7 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -72,7 +72,9 @@ class SlavePool:
pool[m_id] = m
if len(pool) == 0:
- logging.warn("No machines found in this pool")
+ logging.warn("No machines found in pool '%s', directory
'%s'" %
+ (pool_name,
+ dir_path))
max_len = 0
for m_id in pool.keys():
--
2.4.11