Re: [gdal-dev] GDAL Python bindings disables setting a non-zero exit code

2012-09-27 Thread Stefano Iacovella
2012/9/27 Luke Pinner > Thanks Jason, it's definitely GDAL. The order doesn't matter and I've > checked ERRORLEVEL v. %ERRORLEVEL% (see below). I don't think it's > related to the batch file which is just a minimal test script. The > issue occurs with every Windows python script I've written tha

Re: [gdal-dev] GDAL Python bindings disables setting a non-zero exit code

2012-09-26 Thread Luke Pinner
Thanks Jason, it's definitely GDAL. The order doesn't matter and I've checked ERRORLEVEL v. %ERRORLEVEL% (see below). I don't think it's related to the batch file which is just a minimal test script. The issue occurs with every Windows python script I've written that imports gdal - i.e sys.exit(an

Re: [gdal-dev] GDAL Python bindings disables setting a non-zero exit code

2012-09-25 Thread Luke Pinner
Importing the gdal bindings in python seems to disable setting a non-zero exit code. Running the following batch file demonstrates the issue: Running the following batch file demonstrates the issue: @echo off set pycmd=python -c "from osgeo import gdal;import sys;sys.exit(1)" echo %pycmd% %pycmd