From 07c745714bdf2a2c1e69001cf4faf6a83cecc293 Mon Sep 17 00:00:00 2001 From: Anurag Dwivedi Date: Fri, 27 Oct 2017 05:43:07 -0400 Subject: [PATCH] BUG 402 : Raising Exception if the charm directory is not found Signed-off-by: Anurag Dwivedi --- .../rwconman/rift/tasklets/rwconmantasklet/jujuconf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py index 7688dae6..b003df8d 100644 --- a/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py +++ b/rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py @@ -190,8 +190,11 @@ class JujuConfigPlugin(riftcm_config_plugin.RiftCMConfigPluginBase): charm) self._log.debug("jujuCA: Charm dir is {}".format(path)) if not os.path.isdir(path): - self._log.error("jujuCA: Did not find the charm directory at {}".format(path)) + msg = "jujuCA: Did not find the charm directory at {}".format(path) + self._log.error(msg) path = None + # Return from here instead of forwarding the config request to juju_api + raise Exception(msg) except Exception as e: self.log.exception(e) return False -- 2.25.1