From 0d70d2922731180810f53d38316df8360b20bcf0 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 15 Jan 2011 05:54:55 +0000 Subject: [PATCH] Corrected r15205 syntax to be Python2.4 compatible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15210 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/handlers/wsgi.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 2fd99921b8..4e82bc36d7 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -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()