[core] Avoid exception in 500 stack printing view with Python 2
File "/opt/cloudera/parcels/CDH-7.2.9-1.cdh7.2.9.p1.14166188/lib/hue/desktop/core/src/desktop/views.py", line 463, in serve_500_error
tb = '\n'.join(tb.format())
AttributeError: 'list' object has no attribute 'format'
@@ -460,7 +460,7 @@ def serve_500_error(request, *args, **kwargs):
else:
tb = traceback.extract_tb(exc_info[2])
if is_ajax(request):
- tb = '\n'.join(tb.format())
+ tb = '\n'.join(tb.format() if sys.version_info[0] > 2 else [str(t) for t in tb])
return render("500.mako", request, {'traceback': tb})
else:
# exc_info could be empty
