BUG 402 : Raising Exception if the charm directory is not found 31/5631/1
authorAnurag Dwivedi <anurag.dwivedi@riftio.com>
Fri, 27 Oct 2017 09:43:07 +0000 (05:43 -0400)
committerAnurag Dwivedi <anurag.dwivedi@riftio.com>
Fri, 27 Oct 2017 09:43:07 +0000 (05:43 -0400)
Signed-off-by: Anurag Dwivedi <anurag.dwivedi@riftio.com>
rwcm/plugins/rwconman/rift/tasklets/rwconmantasklet/jujuconf.py

index 7688dae..b003df8 100644 (file)
@@ -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