Do not dump the --config argument.

When generating a config file from a commandline, cargo2android.py
should not dump the --config argument, as the point of the dump is to
generate a config file to use.  This would not normally matter, but it
could help in scripts.

Test: Run and do not see --config in the dumped file.
Change-Id: Idc2911ba674e67272c9cf836c89607e10ca0dddd
This commit is contained in:
Joel Galenson
2021-08-17 17:52:04 -07:00
parent 610b6d8a37
commit 9a82ad9d47

View File

@@ -1752,8 +1752,8 @@ def dump_config(parser, args):
# Also filter certain "temporary" arguments. # Also filter certain "temporary" arguments.
non_default_args = {} non_default_args = {}
for arg in args_dict: for arg in args_dict:
if args_dict[arg] != parser.get_default( if (args_dict[arg] != parser.get_default(arg) and arg != 'dump_config_and_exit'
arg) and arg != 'dump_config_and_exit' and arg != 'no_test_mapping': and arg != 'no_test_mapping' and arg != 'config'):
non_default_args[arg.replace('_', '-')] = args_dict[arg] non_default_args[arg.replace('_', '-')] = args_dict[arg]
# Write to the specified file. # Write to the specified file.
with open(args.dump_config_and_exit, 'w') as f: with open(args.dump_config_and_exit, 'w') as f: