def has_target(alias, target):
 if (target == ''):
  raise SaltInvocationError('target can not be an empty string')
 aliases = list_aliases()
 if (alias not in aliases):
  return False
 if isinstance(target, list):
  target = ', '.join(target)
 return (target == aliases[alias])

def has_target ( alias , target ) : if ( target == '' ) : raise SaltInvocationError ( 'target can not be an empty string' ) aliases = list_aliases ( ) if ( alias not in aliases ) : return False if isinstance ( target , list ) : target = ', ' . join ( target ) return ( target == aliases [ alias ] )
return true if the alias/target is set cli example: .