Skip to contentSkip to conversation

conga/luci/site/luci/Extensions cluster_adapte ...

Cluster-devel [email protected] 1 participant 1 message Jul 24, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: jparsons at sourceware.org 2006-07-24 21:51:33

Modified files:
luci/site/luci/Extensions: cluster_adapters.py

Log message:
added exception handler in status check

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/cluster_adapters.py.diff?cvsroot=cluster&r1=1.11&r2=1.12

luci/site/luci/Extensions/cluster_adapters.py +4 -1
@@ -763,7 +763,10 @@
   results = list()
   vals = {}
   vals['type'] = "cluster"
-  vals['alias'] = doc.firstChild.getAttribute('alias')
+  try:
+    vals['alias'] = doc.firstChild.getAttribute('alias')
+  except AttributeError, e:
+    vals['alias'] = doc.firstChild.getAttribute('name')
   vals['votes'] = doc.firstChild.getAttribute('votes')
   vals['name'] = doc.firstChild.getAttribute('name')
   vals['minQuorum'] = doc.firstChild.getAttribute('minQuorum')