Django

Code

Changeset 7065

Show
Ignore:
Timestamp:
02/02/08 20:24:56 (10 months ago)
Author:
mtredinnick
Message:

Fixed #6423 -- Don't fall in a hole in the debug screen if somebody raises an old-fashioned string exception. Thanks, guettli.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/views/debug.py

    r7063 r7065  
    7474    template_does_not_exist = False 
    7575    loader_debug_info = None 
     76 
     77    # Handle deprecated string exceptions 
     78    if isinstance(exc_type, basestring): 
     79        exc_value = Exception('Deprecated String Exception: %r' % exc_type) 
     80        exc_type = type(exc_value) 
     81 
    7682    if issubclass(exc_type, TemplateDoesNotExist): 
    7783        from django.template.loader import template_source_loaders