mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2025-01-01 05:50:34 +01:00
Fix increments for argument parsing
This commit is contained in:
parent
ebacd3cdd4
commit
9725979363
@ -23,8 +23,10 @@ while i < argc:
|
|||||||
split = pname.split('=', maxsplit=1)
|
split = pname.split('=', maxsplit=1)
|
||||||
if len(split) == 2:
|
if len(split) == 2:
|
||||||
pname, v = split
|
pname, v = split
|
||||||
|
i += 1
|
||||||
elif i+1 < argc:
|
elif i+1 < argc:
|
||||||
v = sys.argv[i+1]
|
v = sys.argv[i+1]
|
||||||
|
i += 2
|
||||||
|
|
||||||
if v is not None:
|
if v is not None:
|
||||||
if pname == 'config':
|
if pname == 'config':
|
||||||
@ -33,7 +35,6 @@ while i < argc:
|
|||||||
output_dir = v
|
output_dir = v
|
||||||
else:
|
else:
|
||||||
params_from_args[pname] = v
|
params_from_args[pname] = v
|
||||||
i += 2
|
|
||||||
else:
|
else:
|
||||||
if j == 1:
|
if j == 1:
|
||||||
config_file = arg
|
config_file = arg
|
||||||
|
Loading…
Reference in New Issue
Block a user