From fd13a18c8324d58bb15e964a51e03a1c35232c28 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 19 Jun 2014 15:54:05 -0400 Subject: [PATCH] With dry_run, quote any individual args So that individual commands can be copied and pasted in order to execute them individually. Signed-off-by: Zack Cerza --- teuthology/suite.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/teuthology/suite.py b/teuthology/suite.py index a06b3865d4..cc18ab09cd 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -379,7 +379,15 @@ def schedule_suite(name, arg.extend(config) if dry_run: - log.info('dry-run: %s' % ' '.join(arg)) + # Quote any individual args so that individual commands can be + # copied and pasted in order to execute them individually. + printable_args = [] + for item in arg: + if ' ' in item: + printable_args.append("'%s'" % item) + else: + printable_args.append(item) + log.info('dry-run: %s' % ' '.join(printable_args)) else: subprocess.check_call( args=arg, -- 2.39.5