[GRASS-SVN] r69607 - grass/trunk/scripts/r.mask
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 29 05:50:55 PDT 2016
Author: annakrat
Date: 2016-09-29 05:50:55 -0700 (Thu, 29 Sep 2016)
New Revision: 69607
Modified:
grass/trunk/scripts/r.mask/r.mask.py
Log:
r.mask: ignore case when removing mask for Windows
Modified: grass/trunk/scripts/r.mask/r.mask.py
===================================================================
--- grass/trunk/scripts/r.mask/r.mask.py 2016-09-29 06:32:04 UTC (rev 69606)
+++ grass/trunk/scripts/r.mask/r.mask.py 2016-09-29 12:50:55 UTC (rev 69607)
@@ -67,6 +67,7 @@
#%end
import os
+import sys
import atexit
import grass.script as grass
@@ -101,8 +102,12 @@
if remove:
# -> remove
if exists:
- grass.run_command('g.remove', flags='f', quiet=True,
- type='raster', name='MASK')
+ if sys.platform == 'win32':
+ grass.run_command('g.remove', flags='if', quiet=True,
+ type='raster', name='MASK')
+ else:
+ grass.run_command('g.remove', flags='f', quiet=True,
+ type='raster', name='MASK')
grass.message(_("Raster MASK removed"))
else:
grass.fatal(_("No existing MASK to remove"))
More information about the grass-commit
mailing list