diff options
-rw-r--r-- | rumba/executors/local.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rumba/executors/local.py b/rumba/executors/local.py index d0ebc56..cab626d 100644 --- a/rumba/executors/local.py +++ b/rumba/executors/local.py @@ -41,7 +41,10 @@ class LocalExecutor(mod.Executor): def execute_command(self, node, cmd, sudo=False, time_out=3): try: logger.debug("%s >> %s" % (node.name, cmd)) - subprocess.check_call(cmd.split(' ')) + output = subprocess.check_output(cmd, + universal_newlines=True, + shell=True) + return output.rstrip() except subprocess.CalledProcessError as e: logger.error("Return code was " + str(e.returncode)) raise |