GDAL
September 10, 2016, 4:00pm
1
#3148: d.wms cannot move temp file with os.rename
--------------------------+-------------------------
Reporter: kuszinger | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: Display | Version: svn-trunk
Keywords: wms, display | CPU: Unspecified
Platform: Linux |
--------------------------+-------------------------
In Python on some Linuces/Unices os.rename won't work when the source and
target are on different physical volumes. This is a known Python
limitation in os.rename().
Solution is import shutil and use that for file moving (=renaming)
Household tested, works
{{{
import os
import sys
+import shutil
}}}
And then:
{{{
# os.rename(temp_map, os.environ["GRASS_RENDER_FILE"])
shutil.move(temp_map, os.environ["GRASS_RENDER_FILE"])
}}}
I have no access to dev SVN ( and this is just good like this - so I
post the ticket and solution here.
I recommend to fix it also back in 7.2 if possible.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3148> ;
GRASS GIS <https://grass.osgeo.org >
GDAL
September 10, 2016, 8:03pm
2
#3148: d.wms cannot move temp file with os.rename
--------------------------+--------------------------
Reporter: kuszinger | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: Display | Version: svn-trunk
Resolution: | Keywords: wms, display
CPU: Unspecified | Platform: Linux
--------------------------+--------------------------
Comment (by martinl):
In [changeset:"69429" 69429]:
{{{
#!CommitTicketReference repository="" revision="69429"
d.wms cannot move temp file with os.rename (see #3148
}}}
--
Ticket URL: </ticket/3148#comment:1>
GRASS GIS <https://grass.osgeo.org >
GDAL
September 10, 2016, 8:07pm
3
#3148: d.wms cannot move temp file with os.rename
--------------------------+--------------------------
Reporter: kuszinger | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.0
Component: Display | Version: svn-trunk
Resolution: | Keywords: wms, display
CPU: Unspecified | Platform: Linux
--------------------------+--------------------------
Comment (by martinl):
In [changeset:"69430" 69430]:
{{{
#!CommitTicketReference repository="" revision="69430"
d.wms cannot move temp file with os.rename (see #3148 )
}}}
--
Ticket URL: </ticket/3148#comment:2>
GRASS GIS <https://grass.osgeo.org >
GDAL
September 10, 2016, 8:08pm
4
#3148: d.wms cannot move temp file with os.rename
--------------------------+--------------------------
Reporter: kuszinger | Owner: grass-dev@…
Type: defect | Status: closed
Priority: normal | Milestone: 7.2.0
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: wms, display
CPU: Unspecified | Platform: Linux
--------------------------+--------------------------
Changes (by martinl):
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"69431" 69431]:
{{{
#!CommitTicketReference repository="" revision="69431"
d.wms cannot move temp file with os.rename (fix #3148 )
}}}
--
Ticket URL: </ticket/3148#comment:3>
GRASS GIS <https://grass.osgeo.org >
GDAL
September 10, 2016, 8:08pm
5
#3148: d.wms cannot move temp file with os.rename
--------------------------+--------------------------
Reporter: kuszinger | Owner: grass-dev@…
Type: defect | Status: closed
Priority: normal | Milestone: 7.0.5
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: wms, display
CPU: Unspecified | Platform: Linux
--------------------------+--------------------------
Changes (by martinl):
* milestone: 7.2.0 => 7.0.5
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3148#comment:4> ;
GRASS GIS <https://grass.osgeo.org >