From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 27 Jul 2007 21:17:42 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions RicciQueries.py Message-ID: <20070727211742.16998.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- conga/luci/site/luci/Extensions/RicciQueries.py 2007/07/26 04:20:59 1.1.4.4 +++ conga/luci/site/luci/Extensions/RicciQueries.py 2007/07/27 21:17:41 1.1.4.5 @@ -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')