From fc67fc7cb82b8122f4fcc7a94a1d3bbb1ed39ec2 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Tue, 22 Oct 2024 18:23:16 +0200 Subject: [PATCH] gdal-utils: remove .py from usage text Fixes #11017 --- swig/python/gdal-utils/osgeo_utils/gdal2tiles.py | 4 ++-- swig/python/gdal-utils/osgeo_utils/gdal_merge.py | 2 +- swig/python/gdal-utils/osgeo_utils/gdal_proximity.py | 2 +- swig/python/gdal-utils/osgeo_utils/gdal_retile.py | 2 +- swig/python/gdal-utils/osgeo_utils/gdalattachpct.py | 2 +- swig/python/gdal-utils/osgeo_utils/gdalcompare.py | 2 +- swig/python/gdal-utils/osgeo_utils/gdalmove.py | 2 +- swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py | 2 +- swig/python/gdal-utils/osgeo_utils/ogrmerge.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/swig/python/gdal-utils/osgeo_utils/gdal2tiles.py b/swig/python/gdal-utils/osgeo_utils/gdal2tiles.py index c3e2ddd14dc3..df0f5f01c2db 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal2tiles.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal2tiles.py @@ -707,8 +707,8 @@ class GDALError(Exception): def exit_with_error(message: str, details: str = "") -> NoReturn: # Message printing and exit code kept from the way it worked using the OptionParser (in case # someone parses the error output) - sys.stderr.write("Usage: gdal2tiles.py [options] input_file [output]\n\n") - sys.stderr.write("gdal2tiles.py: error: %s\n" % message) + sys.stderr.write("Usage: gdal2tiles [options] input_file [output]\n\n") + sys.stderr.write("gdal2tiles: error: %s\n" % message) if details: sys.stderr.write("\n\n%s\n" % details) diff --git a/swig/python/gdal-utils/osgeo_utils/gdal_merge.py b/swig/python/gdal-utils/osgeo_utils/gdal_merge.py index 1e005ea56b58..1ca222dcd7ae 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal_merge.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal_merge.py @@ -366,7 +366,7 @@ def copy_into(self, t_fh, s_band=1, t_band=1, nodata_arg=None, verbose=0): # ============================================================================= def Usage(isError): f = sys.stderr if isError else sys.stdout - print("Usage: gdal_merge.py [--help] [--help-general]", file=f) + print("Usage: gdal_merge [--help] [--help-general]", file=f) print( " [-o ] [-of ] [-co =]...", file=f, diff --git a/swig/python/gdal-utils/osgeo_utils/gdal_proximity.py b/swig/python/gdal-utils/osgeo_utils/gdal_proximity.py index 58d885976e8f..c7541633b5bd 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal_proximity.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal_proximity.py @@ -26,7 +26,7 @@ def Usage(isError): f = sys.stderr if isError else sys.stdout print( """ -Usage: gdal_proximity.py [--help] [--help-general] +Usage: gdal_proximity [--help] [--help-general] [-srcband ] [-dstband ] [-of ] [-co =]... [-ot {Byte|UInt16|UInt32|Float32|etc}] diff --git a/swig/python/gdal-utils/osgeo_utils/gdal_retile.py b/swig/python/gdal-utils/osgeo_utils/gdal_retile.py index 728104d5fe16..e16a800913a7 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdal_retile.py +++ b/swig/python/gdal-utils/osgeo_utils/gdal_retile.py @@ -949,7 +949,7 @@ def UsageFormat(): def Usage(isError): f = sys.stderr if isError else sys.stdout - print("Usage: gdal_retile.py [--help] [--help-general]", file=f) + print("Usage: gdal_retile [--help] [--help-general]", file=f) print(" [-v] [-q] [-co =]... [-of ]", file=f) print(" [-ps ]", file=f) print(" [-overlap ]", file=f) diff --git a/swig/python/gdal-utils/osgeo_utils/gdalattachpct.py b/swig/python/gdal-utils/osgeo_utils/gdalattachpct.py index 264c8b5ae29c..a44267341340 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdalattachpct.py +++ b/swig/python/gdal-utils/osgeo_utils/gdalattachpct.py @@ -30,7 +30,7 @@ def Usage(isError=True): f = sys.stderr if isError else sys.stdout - print("Usage: gdalattachpct.py [--help] [--help-general]", file=f) + print("Usage: gdalattachpct [--help] [--help-general]", file=f) print(" ", file=f) return 2 if isError else 0 diff --git a/swig/python/gdal-utils/osgeo_utils/gdalcompare.py b/swig/python/gdal-utils/osgeo_utils/gdalcompare.py index 52ddc4bb854a..32bacaccb090 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdalcompare.py +++ b/swig/python/gdal-utils/osgeo_utils/gdalcompare.py @@ -473,7 +473,7 @@ def find_diff( def Usage(isError=True): f = sys.stderr if isError else sys.stdout - print("Usage: gdalcompare.py [--help] [--help-general]", file=f) + print("Usage: gdalcompare [--help] [--help-general]", file=f) print(" [-dumpdiffs] [-skip_binary] [-skip_overviews]", file=f) print(" [-skip_geolocation] [-skip_geotransform]", file=f) print(" [-skip_metadata] [-skip_rpc] [-skip_srs]", file=f) diff --git a/swig/python/gdal-utils/osgeo_utils/gdalmove.py b/swig/python/gdal-utils/osgeo_utils/gdalmove.py index 64c109174633..a171fe3a11f8 100644 --- a/swig/python/gdal-utils/osgeo_utils/gdalmove.py +++ b/swig/python/gdal-utils/osgeo_utils/gdalmove.py @@ -222,7 +222,7 @@ def move( def Usage(isError=True): f = sys.stderr if isError else sys.stdout print( - """Usage: gdalmove.py [--help] [--help-general] + """Usage: gdalmove [--help] [--help-general] [-s_srs ] -t_srs [-et ] """, file=f, 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 aecb2960dec1..fe9f900072a6 100644 --- a/swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py +++ b/swig/python/gdal-utils/osgeo_utils/ogr_layer_algebra.py @@ -25,7 +25,7 @@ def Usage(isError): print( """ -Usage: ogr_layer_algebra.py [--help] [--help-general] +Usage: ogr_layer_algebra [--help] [--help-general] Union|Intersection|SymDifference|Identity|Update|Clip|Erase -input_ds [-input_lyr ] -method_ds [-method_lyr ] diff --git a/swig/python/gdal-utils/osgeo_utils/ogrmerge.py b/swig/python/gdal-utils/osgeo_utils/ogrmerge.py index 1bb04f45c183..98a4e3353e35 100644 --- a/swig/python/gdal-utils/osgeo_utils/ogrmerge.py +++ b/swig/python/gdal-utils/osgeo_utils/ogrmerge.py @@ -27,7 +27,7 @@ def Usage(isError): f = sys.stderr if isError else sys.stdout - print("Usage: ogrmerge.py [--help] [--help-general]", file=f) + print("Usage: ogrmerge [--help] [--help-general]", file=f) print(" -o []...", file=f) print(" [-f ] [-single] [-nln ]", file=f) print(" [-update | -overwrite_ds] [-append | -overwrite_layer]", file=f)