Merge PR #28198 into master

* refs/pull/28198/head:
	qa/tasks: upgrade command arguments checks in vstart_runner.py

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2019-06-14 11:44:17 -07:00
commit 85470cd171
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -254,6 +254,9 @@ class LocalRemote(object):
errmsg = "Don't surround arguments commands by quotes if it " + \
"contains spaces.\nargs - %s" % (args)
for arg in args:
if isinstance(arg, Raw):
continue
if (arg[0] in ['"', "'"] or arg[-1] in ['"', "'"]) and \
(arg.find(' ') != -1 and 0 < arg.find(' ') < len(arg) - 1):
raise RuntimeError(errmsg)