def find_value(stdout, key):
 match = _HORCM_PATTERNS[key]['pattern'].search(stdout)
 if match:
  if (_HORCM_PATTERNS[key]['type'] is list):
   return [value.strip() for value in LDEV_SEP_PATTERN.split(match.group(key))]
  return _HORCM_PATTERNS[key]['type'](match.group(key))
 return None

def find_value ( stdout , key ) : match = _HORCM_PATTERNS [ key ] [ 'pattern' ] . search ( stdout ) if match : if ( _HORCM_PATTERNS [ key ] [ 'type' ] is list ) : return [ value . strip ( ) for value in LDEV_SEP_PATTERN . split ( match . group ( key ) ) ] return _HORCM_PATTERNS [ key ] [ 'type' ] ( match . group ( key ) ) return None
return the first match from the given raidcom command output .