#3148 closed defect (fixed)
d.wms cannot move temp file with os.rename
Reported by: | kuszinger | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.5 |
Component: | Display | Version: | svn-trunk |
Keywords: | wms, display | Cc: | |
CPU: | Unspecified | Platform: | Linux |
Description
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.
Note:
See TracTickets
for help on using tickets.
In 69429: