def get_cluster_or_404(id):
  try:
    name = id
    cluster = CLUSTERS.get()[name]
  except (__HOLE__, ValueError):
    raise Http404()

  cluster = {
    'id': id,
    'nice_name': id,
    'host_ports': cluster.HOST_PORTS.get(),
    'rest_url': cluster.REST_URL.get(),
  }

  return cluster
dataset/ETHPy150Open cloudera/hue/apps/zookeeper/src/zookeeper/utils.py/get_cluster_or_404