diff --git a/swig/python/gdal-utils/osgeo_utils/gdal_edit.py b/swig/python/gdal-utils/osgeo_utils/gdal_edit.py index 6d760207fc7e..341c89e8dc3a 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal_edit.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal_edit.py @@ -89,7 +89,7 @@ def gdal_edit(argv): argv = gdal.GeneralCmdLineProcessor(argv) if argv is None: - return 2 + return 0 datasetname = None srs = None diff --git a/swig/python/gdal-utils/osgeo_utils/gdal_pansharpen.py b/swig/python/gdal-utils/osgeo_utils/gdal_pansharpen.py index b9bd8cc1477f..7c640c294759 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal_pansharpen.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal_pansharpen.py @@ -71,7 +71,7 @@ def Usage(isError): def main(argv=sys.argv): argv = gdal.GeneralCmdLineProcessor(argv) if argv is None: - return -1 + return 0 pan_name = None spectral_names = [] diff --git a/swig/python/gdal-utils/osgeo_utils/gdal_retile.py b/swig/python/gdal-utils/osgeo_utils/gdal_retile.py index 2c697b055f1b..40a9f9d973da 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal_retile.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal_retile.py @@ -948,7 +948,7 @@ def main(args=None, g=None): args = sys.argv argv = gdal.GeneralCmdLineProcessor(args) if argv is None: - return 1 + return 0 # Parse command line arguments. i = 1 diff --git a/swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py b/swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py index 1dd43e71b6d5..e85b9a3016aa 100644 --- a/swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py +++ b/swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py @@ -193,7 +193,7 @@ def main(argv=sys.argv): argv = ogr.GeneralCmdLineProcessor(argv) if argv is None: - return 1 + return 0 # Parse command line arguments. i = 1 diff --git a/swig/python/gdal-utils/osgeo_utils/ogrmerge.py b/swig/python/gdal-utils/osgeo_utils/ogrmerge.py index cc930926adea..d7b3bfaff7b8 100644 --- a/swig/python/gdal-utils/osgeo_utils/ogrmerge.py +++ b/swig/python/gdal-utils/osgeo_utils/ogrmerge.py @@ -1209,7 +1209,7 @@ def are_sources_gpkg(): def main(argv=sys.argv): argv = ogr.GeneralCmdLineProcessor(argv) if argv is None: - return 1 + return 0 return process(argv[1:])