[GRASS-SVN] r49997 - grass/trunk/scripts/r.mask

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 30 22:54:27 EST 2011


Author: glynn
Date: 2011-12-30 19:54:27 -0800 (Fri, 30 Dec 2011)
New Revision: 49997

Modified:
   grass/trunk/scripts/r.mask/r.mask.py
Log:
Fix r46379


Modified: grass/trunk/scripts/r.mask/r.mask.py
===================================================================
--- grass/trunk/scripts/r.mask/r.mask.py	2011-12-30 23:17:54 UTC (rev 49996)
+++ grass/trunk/scripts/r.mask/r.mask.py	2011-12-31 03:54:27 UTC (rev 49997)
@@ -64,13 +64,7 @@
     if not grass.find_file(input)['file'] and not remove:
         grass.fatal(_("<%s> does not exist.") % input)
 
-    if not 'MASKCATS' in grass.gisenv() and not remove:
-        ## beware: next check is made with != , not with 'is', otherwise:
-        #>>> grass.raster_info("basin_50K")['datatype'] is "CELL"
-        #False
-        # even if:
-        #>>> "CELL" is "CELL"
-        #True 
+    if maskcats and not remove:
         if grass.raster_info(input)['datatype'] != "CELL":
             grass.fatal(_("Raster map %s must be integer for maskcats parameter") % input)
 



More information about the grass-commit mailing list