From: Anurag Dwivedi Date: Fri, 27 Oct 2017 09:43:07 +0000 (-0400) Subject: BUG 402 : Raising Exception if the charm directory is not found X-Git-Tag: v3.0.0rc14~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F31%2F5631%2F1;p=osm%2FSO.git BUG 402 : Raising Exception if the charm directory is not found Signed-off-by: Anurag Dwivedi --- 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