Skip to content

Commit

Permalink
Python utilities: make gdal_edit, gdal_pansharp, gdal_retile and ogr_…
Browse files Browse the repository at this point in the history
…layer_algebra return 0 error code when invoked with --version switch

Fixes conda-forge/gdal-feedstock#835 (review)
  • Loading branch information
rouault authored and github-actions[bot] committed Nov 8, 2023
1 parent 728bf85 commit 2072770
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdal_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def gdal_edit(argv):

argv = gdal.GeneralCmdLineProcessor(argv)
if argv is None:
return 2
return 0

datasetname = None
srs = None
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdal_pansharpen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/gdal_retile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/ogrmerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:])


Expand Down

0 comments on commit 2072770

Please sign in to comment.