comparison src/memory/params.py @ 1051:854880a31717

memory (params), test: fixes updateParams bug
author souliane <souliane@mailoo.org>
date Tue, 03 Jun 2014 17:10:12 +0200
parents de415d7984f7
children b29452cab50b
comparison
equal deleted inserted replaced
1050:de415d7984f7 1051:854880a31717
248 for child in src_parent.childNodes: 248 for child in src_parent.childNodes:
249 if child.nodeName == '#text': 249 if child.nodeName == '#text':
250 continue 250 continue
251 node = self.__get_unique_node(tgt_parent, child.nodeName, child.getAttribute("name")) 251 node = self.__get_unique_node(tgt_parent, child.nodeName, child.getAttribute("name"))
252 if not node: # The node is new 252 if not node: # The node is new
253 tgt_parent.appendChild(child) 253 tgt_parent.appendChild(child.cloneNode(True))
254 else: 254 else:
255 if child.nodeName == "param": 255 if child.nodeName == "param":
256 # The child updates an existing parameter, we replace the node 256 # The child updates an existing parameter, we replace the node
257 tgt_parent.replaceChild(child, node) 257 tgt_parent.replaceChild(child, node)
258 else: 258 else: