id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4830,GDAL Python bindings disables setting a non-zero exit code on Windows 7,lpinner,hobu,"Importing the gdal bindings in python seems to disable setting a non-zero exit code. 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% echo ERRORLEVEL=%ERRORLEVEL% echo. set pycmd=python -c ""import sys;sys.exit(1)"" echo %pycmd% %pycmd% echo ERRORLEVEL=%ERRORLEVEL% echo. pause }}} This prints out: {{{ python -c ""from osgeo import gdal;import sys;sys.exit(1)"" ERRORLEVEL=0 python -c ""import sys;sys.exit(1)"" ERRORLEVEL=1 }}} Tested on Windows 7 Pro and Server 2008 R2 64bit with GDAL 1.9.1 MSVC2008 (Win32) with 32bit python 2.6.5 and GDAL 1.9.1 MSVC2008 (Win64) with 64bit python 2.6.6. Interestingly, one of the users of my code who originally reported the issue to me found that that ERRORLEVEL is set correctly in Windows XP. ",defect,closed,normal,,PythonBindings,1.10.0,normal,wontfix,,stefano.iacovella@… antonio tamas