[GRASS-SVN] r60947 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 24 11:24:05 PDT 2014


Author: annakrat
Date: 2014-06-24 11:24:05 -0700 (Tue, 24 Jun 2014)
New Revision: 60947

Modified:
   grass/trunk/gui/wxpython/core/render.py
Log:
wxGUI/render: attempt to fix #560

Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2014-06-24 17:25:31 UTC (rev 60946)
+++ grass/trunk/gui/wxpython/core/render.py	2014-06-24 18:24:05 UTC (rev 60947)
@@ -81,7 +81,10 @@
             else:
                 tempfile_sfx = ".ppm"
 
-            self.mapfile = tempfile.mkstemp(suffix = tempfile_sfx)[1]
+            mapfile = tempfile.NamedTemporaryFile(suffix=tempfile_sfx, delete=False)
+            # we don't want it open, we just need the name
+            self.mapfile = mapfile.name
+            mapfile.close()
             self.maskfile = self.mapfile.rsplit(".",1)[0] + ".pgm"
         else:
             self.mapfile = self.maskfile = None



More information about the grass-commit mailing list