From 420b6aeae7ac700870951c75ba9a4cd5130b56d4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 16 Oct 2011 15:08:00 +0200 Subject: [PATCH] ensure object is not ran twice Signed-off-by: Nico Schottelius --- lib/cdist/config_install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/cdist/config_install.py b/lib/cdist/config_install.py index fe705b95..fa5cf2b0 100644 --- a/lib/cdist/config_install.py +++ b/lib/cdist/config_install.py @@ -88,7 +88,7 @@ class ConfigInstall(object): for cdist_object in core.Object.list_objects(self.local.object_path, self.local.type_path): if cdist_object.prepared: - self.log.debug("Skipping rerun of object %s", cdist_object) + self.log.debug("Skipping re-prepare of object %s", cdist_object) continue else: self.object_prepare(cdist_object) @@ -128,8 +128,11 @@ class ConfigInstall(object): self.log.info("Running gencode and code for " + cdist_object.name) # Catch requirements, which re-call us + # FIXME: change .ran to running if cdist_object.ran: return + else: + cdist_object.ran = True cdist_type = cdist_object.type