From 82b8b67446f6737a22593876c8e77ff19532e2c5 Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Sun, 11 Apr 2010 18:59:03 +0000 Subject: [PATCH] Fixed #9437 -- Now close the connection after getting the PostGIS version during spatial backend initialization. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12948 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/gis/db/backends/postgis/operations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/contrib/gis/db/backends/postgis/operations.py b/django/contrib/gis/db/backends/postgis/operations.py index eeb91050029fc..ddf10de673fd7 100644 --- a/django/contrib/gis/db/backends/postgis/operations.py +++ b/django/contrib/gis/db/backends/postgis/operations.py @@ -413,7 +413,8 @@ def _get_postgis_func(self, func): # Responsibility of callers to perform error handling. raise finally: - cursor.close() + # Close out the connection. See #9437. + self.connection.close() return row[0] def postgis_geos_version(self):