def check_config(request):
  if not request.user.is_superuser:
    return HttpResponse(_("You must be a superuser."))

  context = {
    'conf_dir': os.path.realpath(os.getenv("HUE_CONF_DIR", get_desktop_root("conf"))),
    'error_list': _get_config_errors(request, cache=False),
  }

  if request.GET.get('format') == 'json':
    return JsonResponse(context)
  else:
    return render('check_config.mako', request, context, force_template=True)
Adds a signal handler to handle KeyboardInterrupt.
dataset/ETHPy150Open cloudera/hue/desktop/core/src/desktop/views.py/check_config--crossover with--dataset/ETHPy150Open chrippa/python-librtmp/librtmp/utils.py/add_signal_handler