mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[options] fix passing negative numbers as arguments (#5262)
https://github.com/mikf/gallery-dl/issues/5262#issuecomment-2468677453
fixes regression introduced in 9e729681
'argparse' sets a flag and changes its behavior when using something
that looks like a negative number as option string, '-4' and '-6' in
this case.
This commit is contained in:
parent
30ff775382
commit
cd6d6ea8be
@ -803,4 +803,10 @@ def build_parser():
|
||||
"&& convert * ../doc.pdf\""),
|
||||
)
|
||||
|
||||
try:
|
||||
# restore normal behavior when adding '-4' or '-6' as arguments
|
||||
parser._has_negative_number_optionals.clear()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return parser
|
||||
|
Loading…
Reference in New Issue
Block a user