summaryrefslogtreecommitdiff
path: root/clusterman/commands/frontend.py
diff options
context:
space:
mode:
Diffstat (limited to 'clusterman/commands/frontend.py')
-rw-r--r--clusterman/commands/frontend.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/clusterman/commands/frontend.py b/clusterman/commands/frontend.py
index 963357b..bb930cb 100644
--- a/clusterman/commands/frontend.py
+++ b/clusterman/commands/frontend.py
@@ -26,9 +26,10 @@ def info():
print(", ", end="")
pattern = re.compile(CONF["cluster"]["groups"][group])
count=0
- for ip in nodes:
- if pattern.match(ip):
- count=count+1
+ if not nodes == None:
+ for ip in nodes:
+ if pattern.match(ip):
+ count=count+1
print("{}({})".format(group,count),end="")
print()
else: