From 32b2c49d32c5d4ad7f2b53062dc3e19ee0d5761a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 16 Oct 2011 12:39:06 +0200 Subject: [PATCH] found 2 bugs in transfer_code_remote Signed-off-by: Nico Schottelius --- lib/cdist/core/code.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cdist/core/code.py b/lib/cdist/core/code.py index 0f2591b3..2505925c 100644 --- a/lib/cdist/core/code.py +++ b/lib/cdist/core/code.py @@ -121,6 +121,10 @@ class Code(object): """Transfer the code_remote script for the given object to the remote side.""" source = os.path.join(self.local.object_path, cdist_object.code_remote_path) destination = os.path.join(self.remote.object_path, cdist_object.code_remote_path) + # FIXME: BUG: do not create destination, but top level of destination! + # FIXME: BUG2: we are called AFTER the code-remote has been transferred already: + # mkdir: cannot create directory `/var/lib/cdist/object/__directory/etc/acpi/actions/.cdist/code-remote': File exists + # OR: this is from previous run -> cleanup missing! self.remote.mkdir(destination) self.remote.transfer(source, destination)