diff options
| author | David Cramer | 2011-05-23 11:49:42 -0700 | 
|---|---|---|
| committer | David Cramer | 2011-05-23 11:49:42 -0700 | 
| commit | 13c2043af8a6d82f8260ea8d190b1e4c0624f1f7 (patch) | |
| tree | d606211b7b64d32c50c0092d81b920f20b997092 | |
| parent | e08ec8c6ac0b4d9471c33460bd5c615293c0da59 (diff) | |
| download | django-debug-toolbar-13c2043af8a6d82f8260ea8d190b1e4c0624f1f7.tar.bz2 | |
handle cases when text is a NoneType
| -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): | 
