mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

andrug
14.51.2008 1f7b0caaeb1575e5600335dcd84a00cc408469bf
avoid staxexception when conf.xml node is empty
1 files modified
17 ■■■■■ changed files
opends/tests/system-tests/phases/parser/parser.py 17 ●●●●● patch | view | raw | blame | history
opends/tests/system-tests/phases/parser/parser.py
@@ -385,14 +385,17 @@
def _getPropValue(myNode):
  "This function get the first node text value of a node"
  propValueNode = myNode.getFirstChild()
  if (propValueNode.getNodeType() == Node.TEXT_NODE or
      propValueNode.getNodeType() == Node.COMMENT_NODE):
    #out = '%s' % (myNode.getNodeName())
    out = '%s' % (propValueNode.getNodeValue())
  else:
    out = 'ERROR %s has not a text children node type, should be' % \
  try:
    propValueNode = myNode.getFirstChild()
    if (propValueNode.getNodeType() == Node.TEXT_NODE or
        propValueNode.getNodeType() == Node.COMMENT_NODE):
      #out = '%s' % (myNode.getNodeName())
      out = '%s' % (propValueNode.getNodeValue())
    else:
     out = 'ERROR node has not a text children node type or is empty, should be' % \
          (myNode.getNodeName())
  except AttributeError:
    out = NOT_DEFINED
  return out
def _getAttributeNode(myNode,myAttributeName):