From: Volker Theile Date: Thu, 11 Jul 2019 13:15:10 +0000 (+0200) Subject: qa: vstart_runner fails because of string index out of range X-Git-Tag: v15.1.0~2222^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28990%2Fhead;p=ceph.git 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 --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index fee3270fbdc9..dd477a62f4ff 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)