Corrected r15205 syntax to be Python2.4 compatible.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-01-15 05:54:55 +00:00
parent 8b4dffd8df
commit 0d70d29227
1 changed files with 8 additions and 7 deletions

View File

@ -243,13 +243,14 @@ class WSGIHandler(base.BaseHandler):
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()