From 1e31721ad995144f03614a261517ce8156f9a9bb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 14 Oct 2011 23:50:31 +0200 Subject: [PATCH 1/2] BUGFIX: remote path for explorer in __object variable Signed-off-by: Nico Schottelius --- lib/cdist/core/explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cdist/core/explorer.py b/lib/cdist/core/explorer.py index 9dd5d210..14a66ff4 100644 --- a/lib/cdist/core/explorer.py +++ b/lib/cdist/core/explorer.py @@ -122,7 +122,7 @@ class Explorer(object): cdist_type = cdist_object.type env = self.env.copy() env.update({ - '__object': cdist_object.absolute_path, + '__object': os.path.join(self.remote.object_path, cdist_object.path), '__object_id': cdist_object.object_id, '__object_fq': cdist_object.path, '__type_explorer': os.path.join(self.remote.type_path, cdist_type.explorer_path) From 9223663136f8b9a90d20eb58a9b67ae2f4cf1c5a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 14 Oct 2011 23:51:01 +0200 Subject: [PATCH 2/2] CLEANUP: return flat name, not python list to user Signed-off-by: Nico Schottelius --- lib/cdist/exec/local.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cdist/exec/local.py b/lib/cdist/exec/local.py index 56c29cb7..59f1ee4d 100644 --- a/lib/cdist/exec/local.py +++ b/lib/cdist/exec/local.py @@ -40,7 +40,8 @@ class LocalScriptError(cdist.Error): self.script_content = script_content def __str__(self): - return "Local script execution failed: %s %s" % (self.script, self.command) + plain_command = " ".join(self.command) + return "Local script execution failed: %s %s" % (self.script, plain_command) class Local(object):