diff options
| -rw-r--r-- | debug_toolbar/utils/__init__.py | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/debug_toolbar/utils/__init__.py b/debug_toolbar/utils/__init__.py index 3f035e6..2ce38db 100644 --- a/debug_toolbar/utils/__init__.py +++ b/debug_toolbar/utils/__init__.py @@ -36,7 +36,11 @@ def tidy_stacktrace(stack):              continue          if socketserver_path in s_path:              continue -        trace.append((path, line_no, func_name, (''.join(text)).strip())) +        if not text: +            text = '' +        else: +            text = (''.join(text)).strip() +        trace.append((path, line_no, func_name, text))      return trace  def get_template_info(source, context_lines=3): | 
