1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

[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
This commit is contained in:
Justin Bronn 2010-04-11 19:01:02 +00:00
parent b2ecfe845f
commit bf5d71f2a7

View File

@ -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 ###