#2832: r.damflood return code
-------------------------+-------------------------
 Reporter:  pmav99       |      Owner:  grass-dev@…
     Type:  defect       |     Status:  new
 Priority:  normal       |  Milestone:  7.0.3
Component:  Addons       |    Version:  unspecified
 Keywords:  r.damflood   |        CPU:  Unspecified
 Platform:  Unspecified  |
-------------------------+-------------------------
 It seems that `r.damflood` [https://trac.osgeo.org/grass/browser/grass-
 addons/grass7/raster/r.damflood/main.c#L1439 is not returning an integer
 value from it's `main`] and as a result the actual return value is
 [http://stackoverflow.com/a/4260070/592289 undefined]

 {{{#!bash
 GRASS 7.0.1 (nc_basic_spm_grass7):~/repo > r.damflood --overwrite
 --verbose elev=dam_elevation lake=lake_map manning=manning
 dambreak=total_dam timestep=0.01 tstop=20 deltat=10 h=H_
 wavefront=wavefront
 Reading input maps
 Model running
 Time: 10, writing the output maps
 Writing the output final map H_20
 Writing the output final map wavefront

 GRASS 7.0.1 (nc_basic_spm_grass7):~/repo > echo $?
 1
 }}}
 The problem with this is that when you invoke the script using e.g.
 `grass.script.run_command()` you get an exception even though the
 execution finished without problems. Not a huge deal but it caused me some
 headscratching.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2832>
GRASS GIS <https://grass.osgeo.org>

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to