[GRASS-SVN] r59237 - in grass/trunk/scripts: d.rast.leg r.buffer.lowmem r.fillnulls r.grow r.mask v.krige v.report

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 12 03:43:38 PDT 2014


Author: marisn
Date: 2014-03-12 03:43:38 -0700 (Wed, 12 Mar 2014)
New Revision: 59237

Modified:
   grass/trunk/scripts/d.rast.leg/d.rast.leg.py
   grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py
   grass/trunk/scripts/r.fillnulls/r.fillnulls.py
   grass/trunk/scripts/r.grow/r.grow.py
   grass/trunk/scripts/r.mask/r.mask.py
   grass/trunk/scripts/v.krige/v.krige.py
   grass/trunk/scripts/v.report/v.report.py
Log:
Unify error messages

Modified: grass/trunk/scripts/d.rast.leg/d.rast.leg.py
===================================================================
--- grass/trunk/scripts/d.rast.leg/d.rast.leg.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/d.rast.leg/d.rast.leg.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -97,11 +97,11 @@
 
     #for -n flag of d.legend
     if not grass.find_file(map)['file']:
-        grass.fatal(_("Raster map <%s> not found in mapset search path") % map)
+        grass.fatal(_("Raster map <%s> not found") % map)
 
     # for rast=
     if rast and not grass.find_file(rast)['file']:
-        grass.fatal(_("Raster map <%s> not found in mapset search path") % rast)
+        grass.fatal(_("Raster map <%s> not found") % rast)
 
     s = grass.read_command('d.info', flags = 'f')
     if not s:

Modified: grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py
===================================================================
--- grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/r.buffer.lowmem/r.buffer.lowmem.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -77,7 +77,7 @@
 
     #check if input file exists
     if not grass.find_file(input)['file']:
-        grass.fatal(_("<%s> does not exist.") % input)
+        grass.fatal(_("Raster map <%s> not found") % input)
 
     scale = scales[units]
 

Modified: grass/trunk/scripts/r.fillnulls/r.fillnulls.py
===================================================================
--- grass/trunk/scripts/r.fillnulls/r.fillnulls.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/r.fillnulls/r.fillnulls.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -127,7 +127,7 @@
 
     #check if input file exists
     if not grass.find_file(input)['file']:
-        grass.fatal(_("Map <%s> does not exist.") % input)
+        grass.fatal(_("Raster map <%s> not found") % input)
 
     # save original region
     reg_org = grass.region()

Modified: grass/trunk/scripts/r.grow/r.grow.py
===================================================================
--- grass/trunk/scripts/r.grow/r.grow.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/r.grow/r.grow.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -105,7 +105,7 @@
 
     #check if input file exists
     if not grass.find_file(input)['file']:
-        grass.fatal(_("Map <%s> does not exist.") % input)
+        grass.fatal(_("Raster map <%s> not found") % input)
 
     if grass.run_command('r.grow.distance',  input = input, metric = metric,
                       distance = temp_dist, value = temp_val) != 0:

Modified: grass/trunk/scripts/r.mask/r.mask.py
===================================================================
--- grass/trunk/scripts/r.mask/r.mask.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/r.mask/r.mask.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -112,7 +112,7 @@
         if raster:
             # check if input raster exists
             if not grass.find_file(raster)['file']:
-                grass.fatal(_("<%s> does not exist.") % raster)
+                grass.fatal(_("Raster map <%s> not found") % raster)
 
             if maskcats != '*' and not remove:
                 if grass.raster_info(raster)['datatype'] != "CELL":
@@ -126,7 +126,7 @@
         elif vector:
             vector_name = grass.find_file(vector, 'vector')['fullname']
             if not vector_name:
-                grass.fatal(_("<%s> does not exist.") % vector)
+                grass.fatal(_("Vector map <%s> not found") % vector)
             
             # parser bug?
             if len(cats) == 0:

Modified: grass/trunk/scripts/v.krige/v.krige.py
===================================================================
--- grass/trunk/scripts/v.krige/v.krige.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/v.krige/v.krige.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -332,7 +332,7 @@
         
         #@TODO: Work on verbosity. Sometimes it's too verbose (R), sometimes not enough.
         if grass.find_file(options['input'], element = 'vector')['fullname'] is '':
-            grass.fatal(_("option: <input>: Vector map not found.")) #TODO cosmetics, insert real map name
+            grass.fatal(_("Vector map <%s> not found") % options['input'] )
         
         #@TODO: elaborate input string, if contains mapset or not.. thanks again to Bob for testing on 64bit.
         

Modified: grass/trunk/scripts/v.report/v.report.py
===================================================================
--- grass/trunk/scripts/v.report/v.report.py	2014-03-12 10:29:56 UTC (rev 59236)
+++ grass/trunk/scripts/v.report/v.report.py	2014-03-12 10:43:38 UTC (rev 59237)
@@ -64,7 +64,7 @@
     nuldev = file(os.devnull, 'w')
 
     if not grass.find_file(mapname, 'vector')['file']:
-        grass.fatal(_("Vector map '%s' not found in mapset search path.") % mapname)
+        grass.fatal(_("Vector map <%s> not found") % mapname)
 
     colnames = grass.vector_columns(mapname, layer, getDict = False, stderr = nuldev)
     



More information about the grass-commit mailing list