From a0a04a32e9d457c7d8bb7905986cbe565477feda Mon Sep 17 00:00:00 2001 From: rread Date: Thu, 4 Jul 2002 01:37:09 +0000 Subject: [PATCH] - fix lookup bug --- lustre/utils/lconf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index bbe3239..bf003ac 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -197,6 +197,7 @@ def getText(node, tag): # Recusively search for a particular node by uuid def getByUUID(node, uuid): + fixme() for n in node.childNodes: if n.nodeType == n.ELEMENT_NODE: if getUUID(n) == uuid: @@ -206,9 +207,15 @@ def getByUUID(node, uuid): # Recusively search for a particular node by name def getByName(node, name): for n in node.childNodes: - if n.nodeType == n.ELEMENT_NODE: + # this service_id check is ugly. need some other way to + # differentiate between definitions and references + if n.nodeType == n.ELEMENT_NODE and n.nodeName != 'service_id': if getName(n) == name: return n + else: + n = getByName(n, name) + if n: return n + return None # Get name attribute of node -- 1.8.3.1