def _cron_matched(cron, cmd, identifier=None):
 (ret, id_matched) = (False, None)
 cid = _cron_id(cron)
 if cid:
  if (not identifier):
   identifier = SALT_CRON_NO_IDENTIFIER
  eidentifier = _encode(identifier)
  if ((cron.get('cmd', None) != cmd) and (cid == SALT_CRON_NO_IDENTIFIER) and (eidentifier == SALT_CRON_NO_IDENTIFIER)):
   id_matched = False
  else:
   if ((cron.get('cmd', None) == cmd) and (cid == SALT_CRON_NO_IDENTIFIER) and identifier):
    cid = eidentifier
   id_matched = (eidentifier == cid)
 if (((id_matched is None) and (cmd == cron.get('cmd', None))) or id_matched):
  ret = True
 return ret

def _cron_matched ( cron , cmd , identifier = None ) : ( ret , id_matched ) = ( False , None ) cid = _cron_id ( cron ) if cid : if ( not identifier ) : identifier = SALT_CRON_NO_IDENTIFIER eidentifier = _encode ( identifier ) if ( ( cron . get ( 'cmd' , None ) != cmd ) and ( cid == SALT_CRON_NO_IDENTIFIER ) and ( eidentifier == SALT_CRON_NO_IDENTIFIER ) ) : id_matched = False else : if ( ( cron . get ( 'cmd' , None ) == cmd ) and ( cid == SALT_CRON_NO_IDENTIFIER ) and identifier ) : cid = eidentifier id_matched = ( eidentifier == cid ) if ( ( ( id_matched is None ) and ( cmd == cron . get ( 'cmd' , None ) ) ) or id_matched ) : ret = True return ret
check if: - we find a cron with same cmd .