António Rocha wrote: > I have built a Py Script that is similar to r.in.aster, I mean, to > reproject/project a file and then import into grass. > > The problem is when I select a non raster file. A get an error in > GDALWARP but the script continue. > And then it calls r.in.gdal to import and then I get ERROR 4. What I > want is a way to "stop" the process (with grass_fatal) when I get ERROR 4. > Is this possible? can anyone give me a tip? Some approach to get the > error. I have tried with try: except: but it didn't work out
Check the exit code from the command. Commands should use a non-zero exit code if there was an error. It would help to know exactly how the command is being run. -- Glynn Clements <gl...@gclements.plus.com> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev