Skip to contentSkip to conversation

conga/luci/site/luci/Extensions RicciQueries.py

Cluster-devel [email protected] 1 participant 1 message Jul 27, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-07-27 21:17:41

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

Log message:
Ignore text nodes when looking for cluster.conf

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/RicciQueries.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.4.4&r2=1.1.4.5

luci/site/luci/Extensions/RicciQueries.py +5 -1
@@ -671,6 +671,8 @@
 	return resultlist
 
 def getClusterConf(rc):
+	import xml.dom
+
 	if rc is None:
 		return None
 
@@ -712,7 +714,9 @@
 	var_nodes = ret.getElementsByTagName('var')
 	for i in var_nodes:
 		if i.getAttribute('name') == 'cluster.conf':
-			return i.childNodes[0]
+			for j in i.childNodes:
+				if j.nodeType == xml.dom.Node.ELEMENT_NODE:
+					return j
 
 	if LUCI_DEBUG_MODE is True:
 		luci_log.debug_verbose('GCC2: no conf node found')