summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2010-04-11 18:59:03 +0000
committerJustin Bronn <jbronn@gmail.com>2010-04-11 18:59:03 +0000
commit82b8b67446f6737a22593876c8e77ff19532e2c5 (patch)
tree6e59fc0ec21a0a926a665a9206fe8ff1ded20193
parentfaceca7075d72d55f0eebc586049fb634cd46129 (diff)
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
-rw-r--r--django/contrib/gis/db/backends/postgis/operations.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/gis/db/backends/postgis/operations.py b/django/contrib/gis/db/backends/postgis/operations.py
index eeb9105002..ddf10de673 100644
--- a/django/contrib/gis/db/backends/postgis/operations.py
+++ b/django/contrib/gis/db/backends/postgis/operations.py
@@ -413,7 +413,8 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
# 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):