diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-06-25 23:46:00 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-06-26 13:41:48 +0200 |
| commit | 60879a2193fe79b3853c60782fc4f1fdfdd55d63 (patch) | |
| tree | 4355098f9bf38826b4e7fed5257f1aaa751f9af2 | |
| parent | ad82d0003b5a3694028119bad580b090e994181e (diff) | |
Loaded real destructor functions before garbage time
This is an alternative patch to the unsuccessful b43b27bcd.
| -rw-r--r-- | django/contrib/gis/geos/prototypes/io.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/contrib/gis/geos/prototypes/io.py b/django/contrib/gis/geos/prototypes/io.py index de049e460f..656ff922b4 100644 --- a/django/contrib/gis/geos/prototypes/io.py +++ b/django/contrib/gis/geos/prototypes/io.py @@ -125,6 +125,11 @@ class IOBase(GEOSBase): def __init__(self): # Getting the pointer with the constructor. self.ptr = self._constructor() + # Loading the real destructor function at this point as doing it in + # __del__ is too late (import error). + self._destructor.func = self._destructor.get_func( + *self._destructor.args, **self._destructor.kwargs + ) def __del__(self): # Cleaning up with the appropriate destructor. |
