def load_queues_from_file(self, app_id):
    """ Parses the queue.yaml or queue.xml file of an application
        and loads it into the class.
   
    Args:
      app_id: The application ID.
    Returns:
      A dictionary of the queue settings.
    Raises:
      ValueError: If queue_file is unable to get loaded.
    """
    queue_file = self.get_queue_file_location(app_id)
    info = ""
    using_default = False
    try:
      info = file_io.read(queue_file)
      logging.info("Found queue file for app {0}".format(app_id))
    except IOError:
      logging.info("No queue file found for app {0}, using default queue" \
        .format(app_id))
      info = self.DEFAULT_QUEUE_YAML
      using_default = True
    queue_info = ""

    #TODO handle bad xml/yaml files.
    if queue_file.endswith('yaml') or using_default:
      queue_info = queueinfo.LoadSingleQueue(info).ToDict()
    elif queue_file.endswith('xml'):
      queue_info = self.parse_queue_xml(info)
    else:
      raise ValueError("Unable to load queue information with %s" % queue_file)

    if not queue_info:
      raise ValueError("Queue information with %s not set" % queue_file)

    # We add in the default queue if its not already in there.
    has_default = False
    if queue_info not in 'queue' or len(queue_info['queue']) == 0:
      queue_info = {'queue' : [{'rate':'5/s', 'name': 'default'}]}

    for queue in queue_info['queue']:
      if queue['name'] == 'default':
        has_default = True
    if not has_default:
      queue_info['queue'].append({'rate':'5/s', 'name': 'default'})

    self._queue_info_file = queue_info
    logging.info("AppID {0} -- Loaded queue {1}".format(app_id, queue_info))
    return queue_info
dataset/ETHPy150Open AppScale/appscale/AppTaskQueue/tq_config.py/TaskQueueConfig.load_queues_from_file/swapped operands of `not in`