def _xml_read(root, element, check=None):
 val = root.findtext(element)
 if ((val is None) and check):
  LOG.error(_LE('Mandatory parameter not found: %(p)s'), {'p': element})
  raise exception.ParameterNotFound(param=element)
 if (val is None):
  return None
 svc_tag_pattern = re.compile('svc_[0-3]$')
 if (not val.strip()):
  if svc_tag_pattern.search(element):
   return ''
  LOG.error(_LE('Parameter not found: %(param)s'), {'param': element})
  raise exception.ParameterNotFound(param=element)
 LOG.debug('%(element)s: %(val)s', {'element': element, 'val': (val if (element != 'password') else '***')})
 return val.strip()

def _xml_read ( root , element , check = None ) : val = root . findtext ( element ) if ( ( val is None ) and check ) : LOG . error ( _LE ( 'Mandatory parameter not found: %(p)s' ) , { 'p' : element } ) raise exception . ParameterNotFound ( param = element ) if ( val is None ) : return None svc_tag_pattern = re . compile ( 'svc_[0-3]$' ) if ( not val . strip ( ) ) : if svc_tag_pattern . search ( element ) : return '' LOG . error ( _LE ( 'Parameter not found: %(param)s' ) , { 'param' : element } ) raise exception . ParameterNotFound ( param = element ) LOG . debug ( '%(element)s: %(val)s' , { 'element' : element , 'val' : ( val if ( element != 'password' ) else '***' ) } ) return val . strip ( )
read an xml element .