Explorar o código

Unify error messages

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59237 15284696-431f-4ddb-bdfa-cd5b030d7da7
Maris Nartiss %!s(int64=11) %!d(string=hai) anos
pai
achega
1e737f5d41

+ 2 - 2
scripts/d.rast.leg/d.rast.leg.py

@@ -97,11 +97,11 @@ def main():
 
     #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:

+ 1 - 1
scripts/r.buffer.lowmem/r.buffer.lowmem.py

@@ -77,7 +77,7 @@ def main():
 
     #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]
 

+ 1 - 1
scripts/r.fillnulls/r.fillnulls.py

@@ -127,7 +127,7 @@ def main():
 
     #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()

+ 1 - 1
scripts/r.grow/r.grow.py

@@ -105,7 +105,7 @@ def main():
 
     #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:

+ 2 - 2
scripts/r.mask/r.mask.py

@@ -112,7 +112,7 @@ def main():
         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 @@ def main():
         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:

+ 1 - 1
scripts/v.krige/v.krige.py

@@ -332,7 +332,7 @@ def main(argv = None):
         
         #@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.
         

+ 1 - 1
scripts/v.report/v.report.py

@@ -64,7 +64,7 @@ def main():
     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)