def _parse_profile(profile):
 if isinstance(profile, string_types):
  _profile = __salt__['config.option'](profile)
  if (not _profile):
   msg = 'Pillar key for profile {0} not found.'.format(profile)
   raise SaltInvocationError(msg)
 else:
  _profile = profile
 hosts = _profile.get('hosts')
 index = _profile.get('index')
 return (hosts, index)

def _parse_profile ( profile ) : if isinstance ( profile , string_types ) : _profile = __salt__ [ 'config.option' ] ( profile ) if ( not _profile ) : msg = 'Pillar key for profile {0} not found.' . format ( profile ) raise SaltInvocationError ( msg ) else : _profile = profile hosts = _profile . get ( 'hosts' ) index = _profile . get ( 'index' ) return ( hosts , index )
from a pillar key .