From 3c14f7e2f5dbb416c729828b4dbc2c83a26cb92e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 5 Jul 2013 15:00:23 +0200 Subject: [PATCH] add dry run hint Signed-off-by: Nico Schottelius --- cdist/config_install.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cdist/config_install.py b/cdist/config_install.py index c8c18ce7..55c6bb3f 100644 --- a/cdist/config_install.py +++ b/cdist/config_install.py @@ -143,7 +143,13 @@ class ConfigInstall(object): def object_run(self, cdist_object, dry_run=False): """Run gencode and code for an object""" - self.log.debug("Trying to run object " + cdist_object.name) + + if self.dry_run: + dry_run = "" + else: + dry_run = "(dry run)" + + self.log.debug("Trying to run object %s%s" % (cdist_object.name, dry_run)) if cdist_object.state == core.CdistObject.STATE_DONE: raise cdist.Error("Attempting to run an already finished object: %s", cdist_object)