fix --png_compression command line argument (#2950)

- The value of png_compression was always 6, despite the value provided
to the --png_compression argument. This fixes the bug.
- It also fixes an inconsistency between the maximum range of
png_compression and the help text.

- Closes #2945
This commit is contained in:
blessedcoolant 2023-03-14 18:20:17 +13:00 committed by GitHub
commit f9abc6fc85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -490,7 +490,7 @@ class Args(object):
"-z", "-z",
type=int, type=int,
default=6, default=6,
choices=range(0, 9), choices=range(0, 10),
dest="png_compression", dest="png_compression",
help="level of PNG compression, from 0 (none) to 9 (maximum). Default is 6.", help="level of PNG compression, from 0 (none) to 9 (maximum). Default is 6.",
) )
@ -943,7 +943,6 @@ class Args(object):
"--png_compression", "--png_compression",
"-z", "-z",
type=int, type=int,
default=6,
choices=range(0, 10), choices=range(0, 10),
dest="png_compression", dest="png_compression",
help="level of PNG compression, from 0 (none) to 9 (maximum). [6]", help="level of PNG compression, from 0 (none) to 9 (maximum). [6]",