commit 53c567a1f83e7f2bc17cb741107f0af316bde50e
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Fri Sep 20 12:53:47 2013 +0200
SlavePool: Adding a warning when a pool dir is empty
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/SlavePool.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index ebd3c2a..33dca41 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -54,6 +54,9 @@ class SlavePool:
for dirent in dentries:
res.append(self.add_file("%s/%s" % (pool_dir, dirent)))
+ if len(res) == 0:
+ logging.warn("No machines found in this directory")
+
max_len = 0
for m_id, _ in res:
if len(m_id) > max_len:
Show replies by thread