From b812689c4885c2bbe6d76109f6e28d06a25833ad Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Thu, 11 Jul 2019 15:15:10 +0200 Subject: [PATCH] qa: vstart_runner fails because of string index out of range Fix problem in LocalRemote::_perform_checks_and_return_list_of_args() when LocalCephManager::raw_cluster_cmd() is called with a empty command parameter. Fixes: https://tracker.ceph.com/issues/40729 Signed-off-by: Volker Theile --- qa/tasks/vstart_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index fee3270fbdc..dd477a62f4f 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -257,7 +257,7 @@ class LocalRemote(object): if isinstance(arg, Raw): continue - if (arg[0] in ['"', "'"] or arg[-1] in ['"', "'"]) and \ + if arg and (arg[0] in ['"', "'"] or arg[-1] in ['"', "'"]) and \ (arg.find(' ') != -1 and 0 < arg.find(' ') < len(arg) - 1): raise RuntimeError(errmsg) -- 2.39.5