def _is_dupe(msg, request):
 storage = django_messages.get_messages(request)
 if (not storage):
  return False
 try:
  smsg = unicode(msg)
  is_dupe = False
  for message in storage:
   if (unicode(message) == smsg):
    is_dupe = True
    break
 except (UnicodeDecodeError, UnicodeEncodeError):
  return False
 storage.used = False
 return is_dupe

def _is_dupe ( msg , request ) : storage = django_messages . get_messages ( request ) if ( not storage ) : return False try : smsg = unicode ( msg ) is_dupe = False for message in storage : if ( unicode ( message ) == smsg ) : is_dupe = True break except ( UnicodeDecodeError , UnicodeEncodeError ) : return False storage . used = False return is_dupe
returns whether a particular message is already cued for display .