def name_servers_search(search, for_item=True):
 if isinstance(search, basestring):
  search = search.strip()
  if (for_item is True):
   if (search in ['<<inherit>>', '']):
    return search
  search = shlex.split(search)
 if isinstance(search, list):
  for sl in search:
   hostname(sl)
 else:
  raise CX(('Invalid input type %s, expected str or list' % type(search)))
 return search

def name_servers_search ( search , for_item = True ) : if isinstance ( search , basestring ) : search = search . strip ( ) if ( for_item is True ) : if ( search in [ '<<inherit>>' , '' ] ) : return search search = shlex . split ( search ) if isinstance ( search , list ) : for sl in search : hostname ( sl ) else : raise CX ( ( 'Invalid input type %s, expected str or list' % type ( search ) ) ) return search
validate nameservers search domains .