From 6223402b9ecb26d974e71e529e7aa2b63e1cfdf3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 20 Oct 2011 11:07:48 +0200 Subject: [PATCH] bugfix: only attempt to transfer object parameters it their are any Signed-off-by: Steven Armstrong --- lib/cdist/core/explorer.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/cdist/core/explorer.py b/lib/cdist/core/explorer.py index 2e13cc78..86926c27 100644 --- a/lib/cdist/core/explorer.py +++ b/lib/cdist/core/explorer.py @@ -117,10 +117,11 @@ class Explorer(object): def transfer_object_parameters(self, cdist_object): """Transfer the parameters for the given object to the remote side.""" - source = os.path.join(self.local.object_path, cdist_object.parameter_path) - destination = os.path.join(self.remote.object_path, cdist_object.parameter_path) - self.remote.mkdir(destination) - self.remote.transfer(source, destination) + if cdist_object.parameters: + source = os.path.join(self.local.object_path, cdist_object.parameter_path) + destination = os.path.join(self.remote.object_path, cdist_object.parameter_path) + self.remote.mkdir(destination) + self.remote.transfer(source, destination) def run_type_explorer(self, explorer, cdist_object): """Run the given type explorer for the given object and return it's output."""