From 748254e9a5dd7227806ca618d1f9a32ab49f4056 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Mon, 25 Jan 2016 16:49:21 -0800 Subject: toolchain-utils: strip argv[0] before calling Main(). https://chrome-internal-review.googlesource.com/#/c/244221 fixed some cros lint errors, and in the process, modified test_toolchains.py to use argparse instead of optparse. The flags parsing semantics of these modules seem to differ when they see an argument which is not a flag. As a result, "nightly_wrapper.sh" nightly cron jobs are failing with error: "unrecognized arguments: /usr/local/google/crostc/toolchain-utils/test_toolchains.py" This CL strips the argv[0] before calling Main(), since the name of the script is not really an argument and doesn't need to be parsed. BUG=None TEST='nightly_wrapper.sh lumpy ...' proceeds with no error during argument parsing. Change-Id: Idf13ab457170bb051d4d0693a887795d0c16918d Reviewed-on: https://chrome-internal-review.googlesource.com/245868 Commit-Ready: Luis Lozano Tested-by: Luis Lozano Reviewed-by: Luis Lozano --- test_toolchains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test_toolchains.py') diff --git a/test_toolchains.py b/test_toolchains.py index 65c359a6..6a793ded 100755 --- a/test_toolchains.py +++ b/test_toolchains.py @@ -396,5 +396,5 @@ def Main(argv): if __name__ == '__main__': - retval = Main(sys.argv) + retval = Main(sys.argv[1:]) sys.exit(retval) -- cgit v1.2.3