Changeset 6023
- Timestamp:
- 08/28/07 08:03:22 (1 year ago)
- Files:
-
- django/trunk/django/test/client.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/test/client.py
r5916 r6023 12 12 from django.dispatch import dispatcher 13 13 from django.http import SimpleCookie, HttpRequest 14 from django.template import TemplateDoesNotExist 14 15 from django.test import signals 15 16 from django.utils.functional import curry … … 166 167 dispatcher.connect(self.store_exc_info, signal=got_request_exception) 167 168 168 response = self.handler(environ) 169 try: 170 response = self.handler(environ) 171 except TemplateDoesNotExist, e: 172 # If the view raises an exception, Django will attempt to show 173 # the 500.html template. If that template is not available, 174 # we should ignore the error in favor of re-raising the 175 # underlying exception that caused the 500 error. Any other 176 # template found to be missing during view error handling 177 # should be reported as-is. 178 if e.args != ('500.html',): 179 raise 180 181 # Look for a signalled exception and reraise it 182 if self.exc_info: 183 raise self.exc_info[1], None, self.exc_info[2] 169 184 170 185 # Add any rendered template detail to the response … … 180 195 setattr(response, detail, None) 181 196 182 # Look for a signalled exception and reraise it183 if self.exc_info:184 raise self.exc_info[1], None, self.exc_info[2]185 186 197 # Update persistent cookie data 187 198 if response.cookies:
