Code

Ticket #9437: gis-connection-close-trunk.diff

File gis-connection-close-trunk.diff, 587 bytes (added by jbronn, 4 years ago)
Line 
1Index: django/contrib/gis/db/backends/postgis/operations.py
2===================================================================
3--- django/contrib/gis/db/backends/postgis/operations.py        (revision 12936)
4+++ django/contrib/gis/db/backends/postgis/operations.py        (working copy)
5@@ -413,7 +413,8 @@
6                 # Responsibility of callers to perform error handling.
7                 raise
8         finally:
9-            cursor.close()
10+            # Close out the connection.  See #9437.
11+            self.connection.close()
12         return row[0]
13 
14     def postgis_geos_version(self):