[GRASS-dev] [GRASS GIS] #2832: r.damflood return code

#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&gt;
GRASS GIS <https://grass.osgeo.org>

#2832: r.damflood return code
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: Addons | Version: unspecified
Resolution: | Keywords: r.damflood
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by wenzeslaus):

This is definitively a bug. Fixed in r67259. Please test and close the
ticket if it is OK.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2832#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2832: r.damflood return code
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.3
Component: Addons | Version: unspecified
Resolution: fixed | Keywords: r.damflood
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by neteler):

* status: new => closed
* resolution: => fixed

Comment:

No feedback, assuming that it is solved. Closing.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2832#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2832: r.damflood return code
--------------------------+-------------------------
  Reporter: pmav99 | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.3
Component: Addons | Version: unspecified
Resolution: fixed | Keywords: r.damflood
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by pmav99):

Just checked and it works as just fine.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2832#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>