]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: vstart_runner fails because of string index out of range 28990/head
authorVolker Theile <vtheile@suse.com>
Thu, 11 Jul 2019 13:15:10 +0000 (15:15 +0200)
committerVolker Theile <vtheile@suse.com>
Thu, 11 Jul 2019 13:15:10 +0000 (15:15 +0200)
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 <vtheile@suse.com>
qa/tasks/vstart_runner.py

index fee3270fbdc9b57192dfb959f99e826e3b945415..dd477a62f4ff8d0c275a9967710152e0464f8fec 100644 (file)
@@ -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)