[GRASS-SVN] r56870 - in grass-addons/grass7: display/d.mon2 general/g.cloud gui/wxpython/newgui raster/r.hazard.flood vector/v.concave.hull vector/v.ply.rectify

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 21 11:29:55 PDT 2013


Author: annakrat
Date: 2013-06-21 11:29:55 -0700 (Fri, 21 Jun 2013)
New Revision: 56870

Modified:
   grass-addons/grass7/display/d.mon2/d.mon2.py
   grass-addons/grass7/general/g.cloud/g.cloud.py
   grass-addons/grass7/gui/wxpython/newgui/render2.py
   grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py
   grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py
   grass-addons/grass7/vector/v.ply.rectify/v.ply.rectify.py
Log:
again change find_program call

Modified: grass-addons/grass7/display/d.mon2/d.mon2.py
===================================================================
--- grass-addons/grass7/display/d.mon2/d.mon2.py	2013-06-21 17:33:31 UTC (rev 56869)
+++ grass-addons/grass7/display/d.mon2/d.mon2.py	2013-06-21 18:29:55 UTC (rev 56870)
@@ -116,7 +116,7 @@
     ## rest of this won't work, as parent can't inherit from the child..
     ##  (unless we do some ugly g.gisenv) 
     ##  ... any ideas? end by running grass.call(['bash'])?
-    if not grass.find_program(handler):
+    if not grass.find_program(handler, '--help'):
         grass.fatal(_("'%s' not found.") % handler)
 
     os.environ['GRASS_PNGFILE'] = img_tmp

Modified: grass-addons/grass7/general/g.cloud/g.cloud.py
===================================================================
--- grass-addons/grass7/general/g.cloud/g.cloud.py	2013-06-21 17:33:31 UTC (rev 56869)
+++ grass-addons/grass7/general/g.cloud/g.cloud.py	2013-06-21 18:29:55 UTC (rev 56870)
@@ -247,7 +247,7 @@
         grass.fatal(_('$GISBASE not defined'))
         return 0
     # check ssh
-    if not grass.find_program('ssh'):
+    if not grass.find_program('ssh', '-V'):
         grass.fatal(_("%s required. Please install '%s' first.") % ('ssh', 'ssh'))
         return 0
     # parse the grassdata, location e mapset

Modified: grass-addons/grass7/gui/wxpython/newgui/render2.py
===================================================================
--- grass-addons/grass7/gui/wxpython/newgui/render2.py	2013-06-21 17:33:31 UTC (rev 56869)
+++ grass-addons/grass7/gui/wxpython/newgui/render2.py	2013-06-21 18:29:55 UTC (rev 56870)
@@ -453,7 +453,7 @@
         """!Return region projection and map units information
         """
         projinfo = dict()
-        if not grass.find_program('g.proj'):
+        if not grass.find_program('g.proj', '--help'):
             sys.exit(_("GRASS module '%s' not found. Unable to start map "
                        "display window.") % 'g.proj')
         

Modified: grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py
===================================================================
--- grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py	2013-06-21 17:33:31 UTC (rev 56869)
+++ grass-addons/grass7/raster/r.hazard.flood/r.hazard.flood.py	2013-06-21 18:29:55 UTC (rev 56870)
@@ -62,7 +62,7 @@
 def main():
 
     #### check if we have the r.area addon
-    if not grass.find_program('r.area', ['help']):
+    if not grass.find_program('r.area', '--help'):
         grass.fatal(_("The 'r.area' module was not found, install it first:") +
                     "\n" +
                     "g.extension r.area")

Modified: grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py
===================================================================
--- grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py	2013-06-21 17:33:31 UTC (rev 56869)
+++ grass-addons/grass7/vector/v.concave.hull/v.concave.hull.py	2013-06-21 18:29:55 UTC (rev 56870)
@@ -48,7 +48,7 @@
     inf = file(infile, 'r')
     outf = file(outfile, 'w')
 
-    if grass.find_program('sort'):
+    if grass.find_program('sort', '-n'):
         grass.run_command('sort', flags = 'n', stdin = inf, stdout = outf)
     else:
         # FIXME: we need a large-file sorting function

Modified: grass-addons/grass7/vector/v.ply.rectify/v.ply.rectify.py
===================================================================
--- grass-addons/grass7/vector/v.ply.rectify/v.ply.rectify.py	2013-06-21 17:33:31 UTC (rev 56869)
+++ grass-addons/grass7/vector/v.ply.rectify/v.ply.rectify.py	2013-06-21 18:29:55 UTC (rev 56870)
@@ -49,9 +49,9 @@
     currmapset = grass.gisenv()['MAPSET']
 
     #### check for v.in.ply, v.out.ply
-    if not grass.find_program("v.in.ply"):
+    if not grass.find_program("v.in.ply", '--help'):
 	grass.fatal(_("The GRASS addon v.in.ply was not found, please install it first.\n"))
-    if not grass.find_program("v.out.ply"):
+    if not grass.find_program("v.out.ply", '--help'):
 	grass.fatal(_("The GRASS addon v.out.ply was not found, please install it first.\n"))
 
     # import input PLY file



More information about the grass-commit mailing list