Permalink
Browse files

Corrected r15205 syntax to be Python2.4 compatible.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 8b4dffd commit 0d70d2922731180810f53d38316df8360b20bcf0 @freakboy3742 freakboy3742 committed Jan 15, 2011
Showing with 8 additions and 7 deletions.
  1. +8 −7 django/core/handlers/wsgi.py
@@ -243,13 +243,14 @@ def __call__(self, environ, start_response):
if self._request_middleware is None:
self.initLock.acquire()
try:
- # Check that middleware is still uninitialised.
- if self._request_middleware is None:
- self.load_middleware()
- except:
- # Unload whatever middleware we got
- self._request_middleware = None
- raise
+ try:
+ # Check that middleware is still uninitialised.
+ if self._request_middleware is None:
+ self.load_middleware()
+ except:
+ # Unload whatever middleware we got
+ self._request_middleware = None
+ raise
finally:
self.initLock.release()

0 comments on commit 0d70d29

Please sign in to comment.