From 21f13ff5b3d5a42d62f38398c010efcdce30dad7 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 9 Feb 2017 09:03:28 -0500 Subject: [PATCH] Refs #23919 -- Removed an used block in ExceptionReporter.get_traceback_data(). The test from refs #20368 only runs this block on Python 2. --- django/views/debug.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/django/views/debug.py b/django/views/debug.py index c7c1b20f30f..2b829716fdc 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -258,9 +258,6 @@ class ExceptionReporter: frame_vars = [] for k, v in frame['vars']: v = pprint(v) - # The force_escape filter assumes str, make sure that works - if isinstance(v, bytes): - v = v.decode('utf-8', 'replace') # don't choke on non-utf-8 input # Trim large blobs of data if len(v) > 4096: v = '%s... ' % (v[0:4096], len(v))