From bf5d71f2a7ee0565390f2e657027e58197b16c67 Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Sun, 11 Apr 2010 19:01:02 +0000 Subject: [PATCH] [1.1.X] Fixed #9437 -- Now close the connection after getting the PostGIS version during spatial backend initialization. Backport of r12948 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12949 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/gis/db/backend/postgis/management.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/contrib/gis/db/backend/postgis/management.py b/django/contrib/gis/db/backend/postgis/management.py index c1cb32a04f..3174c0229a 100644 --- a/django/contrib/gis/db/backend/postgis/management.py +++ b/django/contrib/gis/db/backend/postgis/management.py @@ -12,7 +12,8 @@ def _get_postgis_func(func): cursor = connection.cursor() cursor.execute('SELECT %s()' % func) row = cursor.fetchone() - cursor.close() + # Close out the connection. See #9437. + connection.close() return row[0] ### PostGIS management functions ###