瀏覽代碼

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á 10 年之前
父節點
當前提交
557394be9f
共有 1 個文件被更改,包括 4 次插入1 次删除
  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