Mercurial > libervia-backend
comparison src/memory/params.py @ 1019:6a16ec17a458
better PEP-8 compliance
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 07 May 2014 15:44:31 +0200 |
parents | fee00f2e11c2 |
children | 8bae81e254a2 |
comparison
equal
deleted
inserted
replaced
1018:e22e4cf86204 | 1019:6a16ec17a458 |
---|---|
596 | 596 |
597 def _getParamNode(self, name, category, type_="@ALL@"): # FIXME: is type_ useful ? | 597 def _getParamNode(self, name, category, type_="@ALL@"): # FIXME: is type_ useful ? |
598 """Return a node from the param_xml | 598 """Return a node from the param_xml |
599 @param name: name of the node | 599 @param name: name of the node |
600 @param category: category of the node | 600 @param category: category of the node |
601 @type_: keyword for search: | 601 @param type_: keyword for search: |
602 @ALL@ search everywhere | 602 @ALL@ search everywhere |
603 @GENERAL@ only search in general type | 603 @GENERAL@ only search in general type |
604 @INDIVIDUAL@ only search in individual type | 604 @INDIVIDUAL@ only search in individual type |
605 @return: a tuple with the node type and the the node, or None if not found""" | 605 @return: a tuple (node type, node) or None if not found""" |
606 | 606 |
607 for type_node in self.dom.documentElement.childNodes: | 607 for type_node in self.dom.documentElement.childNodes: |
608 if (((type_ == "@ALL@" or type_ == "@GENERAL@") and type_node.nodeName == C.GENERAL) | 608 if (((type_ == "@ALL@" or type_ == "@GENERAL@") and type_node.nodeName == C.GENERAL) |
609 or ((type_ == "@ALL@" or type_ == "@INDIVIDUAL@") and type_node.nodeName == C.INDIVIDUAL)): | 609 or ((type_ == "@ALL@" or type_ == "@INDIVIDUAL@") and type_node.nodeName == C.INDIVIDUAL)): |
610 for node in type_node.getElementsByTagName('category'): | 610 for node in type_node.getElementsByTagName('category'): |