Ticket #6359: debug.diff

File debug.diff, 640 bytes (added by guido@…, 17 years ago)

Patch for django/views/debug.py

  • debug.py

     
    192192    Returns (pre_context_lineno, pre_context, context_line, post_context).
    193193    """
    194194    source = None
    195     if loader is not None:
    196         source = loader.get_source(module_name).splitlines()
    197     else:
     195    if loader is not None and hasattr(loader, "get_source"):
     196        source = loader.get_source(module_name)
     197        if source is not None:
     198            source = source.splitlines()
     199    if source is None:
    198200        try:
    199201            f = open(filename)
    200202            try:
Back to Top