Browse Source

wxGUI/render: attempt to fix https://trac.osgeo.org/grass/ticket/560

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60947 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 years ago
parent
commit
557394be9f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gui/wxpython/core/render.py

+ 4 - 1
gui/wxpython/core/render.py

@@ -81,7 +81,10 @@ class Layer(object):
             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