[GRASS-SVN] r69429 - grass/trunk/gui/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 10 13:03:49 PDT 2016


Author: martinl
Date: 2016-09-10 13:03:49 -0700 (Sat, 10 Sep 2016)
New Revision: 69429

Modified:
   grass/trunk/gui/scripts/d.wms.py
Log:
d.wms cannot move temp file with os.rename (see #3148

Modified: grass/trunk/gui/scripts/d.wms.py
===================================================================
--- grass/trunk/gui/scripts/d.wms.py	2016-09-10 18:50:46 UTC (rev 69428)
+++ grass/trunk/gui/scripts/d.wms.py	2016-09-10 20:03:49 UTC (rev 69429)
@@ -157,6 +157,7 @@
 
 import os
 import sys
+import shutil
 
 from grass.script import core as grass
 
@@ -204,7 +205,7 @@
         wms = WMSGdalDrv()
 
     temp_map = wms.GetMap(options, flags)
-    os.rename(temp_map, os.environ["GRASS_RENDER_FILE"])
+    shutil.move(temp_map, os.environ["GRASS_RENDER_FILE"])
 
     return 0
 



More information about the grass-commit mailing list