From 4044d1d311d65a7ebb70e102927efb90c9f946b3 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 2 May 2017 15:55:34 -0600 Subject: [PATCH 1/2] in _check_for_invalid_args ignore quoted strings --- scripts/lib/CIME/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lib/CIME/utils.py b/scripts/lib/CIME/utils.py index 6d79bce05438..1bcb2b328d06 100644 --- a/scripts/lib/CIME/utils.py +++ b/scripts/lib/CIME/utils.py @@ -1238,6 +1238,9 @@ def run_and_log_case_status(func, phase, caseroot='.'): def _check_for_invalid_args(args): for arg in args: + # if arg contains a space then it was originally quoted and we can ignore it here. + if " " in arg: + continue if arg.startswith("--"): continue if arg.startswith("-") and len(arg) > 2: From 5ecbf30fb0cd2bcc763defde08088fc514950044 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 2 May 2017 15:59:07 -0600 Subject: [PATCH 2/2] cleanup --- scripts/lib/CIME/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/lib/CIME/utils.py b/scripts/lib/CIME/utils.py index 1bcb2b328d06..c6a74877adbe 100644 --- a/scripts/lib/CIME/utils.py +++ b/scripts/lib/CIME/utils.py @@ -1239,9 +1239,7 @@ def run_and_log_case_status(func, phase, caseroot='.'): def _check_for_invalid_args(args): for arg in args: # if arg contains a space then it was originally quoted and we can ignore it here. - if " " in arg: - continue - if arg.startswith("--"): + if " " in arg or arg.startswith("--"): continue if arg.startswith("-") and len(arg) > 2: if arg == "-value" or arg == "-noecho":