[GRASS-dev] [GRASS-SVN] r64426 - grass/trunk/lib/python/script

Hi,

should this be backported?

Markus

On Tue, Feb 3, 2015 at 4:20 PM, <svn_grass@osgeo.org> wrote:

Author: glynn
Date: 2015-02-03 07:20:48 -0800 (Tue, 03 Feb 2015)
New Revision: 64426

Modified:
   grass/trunk/lib/python/script/array.py
Log:
numpy.memmap() no longer has _close; use __del__ instead

Modified: grass/trunk/lib/python/script/array.py

--- grass/trunk/lib/python/script/array.py 2015-02-03 15:01:35 UTC (rev 64425)
+++ grass/trunk/lib/python/script/array.py 2015-02-03 15:20:48 UTC (rev 64426)
@@ -150,8 +150,7 @@
         self.filename = filename
         return self

- def _close(self):
- numpy.memmap._close(self)
+ def __del__(self):
         if isinstance(self, array):
             try_remove(self.filename)

@@ -273,10 +272,8 @@

         return self

- def _close(self):
-
- numpy.memmap._close(self)
- if isinstance(self, array):
+ def __del__(self):
+ if isinstance(self, array3d):
             try_remove(self.filename)

     def read(self, mapname, null=None):

_______________________________________________
grass-commit mailing list
grass-commit@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-commit

Markus Neteler wrote:

should this be backported?

I think so. I can't even find which version(s) used _close, so it
seems to have been fairly short-lived.

--
Glynn Clements <glynn@gclements.plus.com>

On Sat, Feb 14, 2015 at 4:12 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Markus Neteler wrote:

should this be backported?

I think so. I can't even find which version(s) used _close, so it
seems to have been fairly short-lived.

Ok, done in r64614.

Markus