From 9a82ad9d477f79997f7fbf8a28f272106159e192 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Tue, 17 Aug 2021 17:52:04 -0700 Subject: [PATCH] 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 --- scripts/cargo2android.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py index fef1d5116..3cc928bb7 100755 --- a/scripts/cargo2android.py +++ b/scripts/cargo2android.py @@ -1752,8 +1752,8 @@ def dump_config(parser, args): # Also filter certain "temporary" arguments. non_default_args = {} for arg in args_dict: - if args_dict[arg] != parser.get_default( - arg) and arg != 'dump_config_and_exit' and arg != 'no_test_mapping': + if (args_dict[arg] != parser.get_default(arg) and arg != 'dump_config_and_exit' + and arg != 'no_test_mapping' and arg != 'config'): non_default_args[arg.replace('_', '-')] = args_dict[arg] # Write to the specified file. with open(args.dump_config_and_exit, 'w') as f: