Till now the run() method in vstart_runner.py accepts commands only as
a (Python) list. It is very inconvenient to write commands as
['setfacl', '-m', 'user:someuser:rwx', 'somedir/somefile'] when they
can be simply be written as
'setfacl -m user:someuser:rwx somedir/somefile'. Also, converting the
latter form to former one is exceedingly simple. So writing commands as
strings should be allowed.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
def run(self, args, check_status=True, wait=True,
stdout=None, stderr=None, cwd=None, stdin=None,
logger=None, label=None, env=None, timeout=None, omit_sudo=True):
+ if str(type(args)).find('str') != -1:
+ args = args.split()
+
try:
if args[args.index('sudo') + 1] in ['-u', 'passwd', 'chown']:
omit_sudo = False