def collections_data(request, collection):
  if request.method != 'POST':
    raise PopupException(_('POST request required.'))

  response = {'status': -1}

  source = request.POST.get('source')

  if source == 'file':
    searcher = CollectionManagerController(request.user)

    searcher.update_data_from_hdfs(request.fs,
                                   collection,
                                   None,
                                   request.POST.get('path'),
                                   request.POST.get('type'),
                                   separator=request.POST.get('separator'),
                                   quote_character=request.POST.get('quote'))

    response['status'] = 0
    response['message'] = _('Index imported!')
  else:
    response['message'] = source % _('Unsupported source %s')

  return JsonResponse(response)
dataset/ETHPy150Open cloudera/hue/desktop/libs/indexer/src/indexer/api.py/collections_data/swapped operands of `%`