From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 31 Oct 2006 13:51:54 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions ricci_bridge.py Message-ID: <20061031135154.14237.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 Changes by: rmccabe at sourceware.org 2006-10-31 13:51:54 Modified files: luci/site/luci/Extensions: ricci_bridge.py Log message: fix non-async callers of batch_run to expect the first node to be '' ricci_xml = rc.batch_run(batch_str, async=False) - doc = getPayload(ricci_xml) + if not ricci_xml or not ricci_xml.firstChild: + luci_log.debug_verbose('ricci_xml is None from batch_run') + + doc = getPayload(ricci_xml.firstChild) if not doc or not doc.firstChild: luci_log.debug_verbose('doc is None from getPayload: %s' % ricci_xml.toxml()) return None @@ -419,9 +422,10 @@ batch_str += '' ricci_xml = rc.batch_run(batch_str, async=False) - if not ricci_xml: + if not ricci_xml or not ricci_xml.firstChild: + luci_log.debug_verbose('no ricci_xml in getDaemonStates') return None - result = extractDaemonInfo(ricci_xml) + result = extractDaemonInfo(ricci_xml.firstChild) return result def extractDaemonInfo(bt_node):