From a87e6f22b5251c364e86d74da535d7aa52b8ce3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 6 Oct 2011 19:59:07 +0200 Subject: [PATCH] use new cdist.Error exception Signed-off-by: Nico Schottelius --- lib/cdist/config_install.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/cdist/config_install.py b/lib/cdist/config_install.py index b1db2855..3b6c79a1 100644 --- a/lib/cdist/config_install.py +++ b/lib/cdist/config_install.py @@ -65,7 +65,7 @@ class ConfigInstall: log.info("Running global explorers") explorers = self.path.list_global_explorers() if(len(explorers) == 0): - raise CdistError("No explorers found in", self.path.global_explorer_dir) + raise cdist.Error("No explorers found in", self.path.global_explorer_dir) self.path.transfer_global_explorers() for explorer in explorers: @@ -159,6 +159,8 @@ class ConfigInstall: def object_run(self, cdist_object, mode): """Run gencode or code for an object""" log.debug("Running %s from %s", mode, cdist_object) + + # FIXME: replace with new object interface file=os.path.join(self.path.object_dir(cdist_object), "require") requirements = cdist.path.file_to_list(file) type = self.path.get_type_from_object(cdist_object) @@ -169,7 +171,7 @@ class ConfigInstall: # # Setup env Variable: - # + # env = os.environ.copy() env['__target_host'] = self.target_host env['__global'] = self.path.out_dir @@ -230,7 +232,7 @@ class ConfigInstall: """The final (and real) step of deployment""" log.info("Generating and executing code") # Now do the final steps over the existing objects - for cdist_object in self.path.list_objects(): + for cdist_object in cdist.core.Object.list_objects(): log.debug("Run object: %s", cdist_object) self.object_run(cdist_object, mode="gencode") self.object_run(cdist_object, mode="code")