Commit 885dd85b authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

Fixed #1785 -- debug view no longer assumes _get_lines_from_file returns None....

Fixed #1785 -- debug view no longer assumes _get_lines_from_file returns None. Thanks, django@binaryfeed.org

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent be0032f5
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ def technical_500_response(request, exc_type, exc_value, tb):
        function = tb.tb_frame.f_code.co_name
        lineno = tb.tb_lineno - 1
        pre_context_lineno, pre_context, context_line, post_context = _get_lines_from_file(filename, lineno, 7)
        if pre_context_lineno:
            frames.append({
                'tb': tb,
                'filename': filename,