From 075e78770ddc1acc143f4ff00e929cf2021e019a Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Thu, 20 Feb 2020 14:27:12 +0100 Subject: [PATCH] Fix shell command execution Change-Id: I42248e3c355c8ea6218d7c9d989a3ad5ad42c57d --- tobiko/shell/sh/_process.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tobiko/shell/sh/_process.py b/tobiko/shell/sh/_process.py index 0fc71cc57..9a9c8ed80 100644 --- a/tobiko/shell/sh/_process.py +++ b/tobiko/shell/sh/_process.py @@ -131,11 +131,11 @@ class ShellProcessFixture(tobiko.SharedFixture): sudo = self.parameters.sudo shell = self.parameters.shell + if shell in [True, None]: + shell = default_shell_command() + if shell: - if shell is True: - shell = default_shell_command() - else: - shell = _command.shell_command(shell) + shell = _command.shell_command(shell) command = shell + [str(command)] else: command = _command.shell_command(command) @@ -478,7 +478,7 @@ def str_from_stream(stream): def default_shell_command(): from tobiko import config CONF = config.CONF - return _command.shell_command(CONF.tobiko.shell.sudo) + return _command.shell_command(CONF.tobiko.shell.command) def default_sudo_command():