Hi there
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
Thanks
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5533 (20101015) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
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 <glynn@gclements.plus.com>