def serve_500_error(request, *args, **kwargs):
  try:
    exc_info = sys.exc_info()
    if exc_info:
      if desktop.conf.HTTP_500_DEBUG_MODE.get() and exc_info[0] and exc_info[1]:
        # If (None, None, None), default server error describing why this failed.
        return django.views.debug.technical_500_response(request, *exc_info)
      else:
        # Could have an empty traceback
        return render("500.mako", request, {'traceback': traceback.extract_tb(exc_info[2])})
    else:
      # exc_info could be empty
      return render("500.mako", request, {})
  finally:
    # Fallback to default 500 response if ours fails
    # Will end up here:
    #   - Middleware or authentication backends problems
    #   - Certain missing imports
    #   - Packaging and install issues
    pass
Grammar for hard wrap linebreak. You don't need to add two
dataset/ETHPy150Open cloudera/hue/desktop/core/src/desktop/views.py/serve_500_error--crossover with--dataset/ETHPy150Open rossant/ipymd/ipymd/lib/markdown.py/InlineGrammar.hard_wrap