From b5b7d8e7271602e0289fe392bfd831be9b3dd38e Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 14 Oct 2011 23:52:05 +0200 Subject: [PATCH] add missing return_output=True argument when fetching script content Signed-off-by: Steven Armstrong --- lib/cdist/exec/local.py | 2 +- lib/cdist/exec/remote.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cdist/exec/local.py b/lib/cdist/exec/local.py index 56c29cb7..679d847b 100644 --- a/lib/cdist/exec/local.py +++ b/lib/cdist/exec/local.py @@ -122,7 +122,7 @@ class Local(object): else: subprocess.check_call(command, env=env) except subprocess.CalledProcessError as error: - script_content = self.run(["cat", script]) + script_content = self.run(["cat", script], return_output=True) self.log.error("Code that raised the error:\n%s", script_content) raise LocalScriptError(script, command, script_content) except EnvironmentError as error: diff --git a/lib/cdist/exec/remote.py b/lib/cdist/exec/remote.py index e1d9f920..9610290b 100644 --- a/lib/cdist/exec/remote.py +++ b/lib/cdist/exec/remote.py @@ -148,7 +148,7 @@ class Remote(object): else: subprocess.check_call(command) except subprocess.CalledProcessError as error: - script_content = self.run(["cat", script]) + script_content = self.run(["cat", script], return_output=True) self.log.error("Code that raised the error:\n%s", script_content) raise RemoteScriptError(script, command, script_content) except EnvironmentError as error: