Skip to content

Commit

Permalink
Python sample scripts: make --version return 0 for gdal_cp/gdal_ls/gd…
Browse files Browse the repository at this point in the history
…al_rm/gdal_rmdir.py

Fixes OSGeo#11550
  • Loading branch information
rouault committed Dec 27, 2024
1 parent c904cbc commit 8d5ca35
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/samples/gdal_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def gdal_cp(argv, progress=None):

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

for i in range(1, len(argv)):
if argv[i] == "-progress":
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/samples/gdal_ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def gdal_ls(argv, fout=sys.stdout):

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

i = 1
argc = len(argv)
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/samples/gdal_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def gdal_rm(argv, progress=None):

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

for i in range(1, len(argv)):
if not argv[i]:
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/osgeo_utils/samples/gdal_rmdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def gdal_rm(argv, progress=None):

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

for i in range(1, len(argv)):
if argv[i] == "-r":
Expand Down

0 comments on commit 8d5ca35

Please sign in to comment.