X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=n2vc%2Flibjuju.py;h=6580067c1a3070d0fab992e45eca1118519b4be9;hb=refs%2Fchanges%2F78%2F11278%2F2;hp=b897bc6fd26d7b6c7b2d9eedc4a2835140c97e9a;hpb=76ed75796553cb3e6bd93a20140d28c21894d8ee;p=osm%2FN2VC.git diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index b897bc6..6580067 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -791,6 +791,13 @@ class Libjuju: raise JujuApplicationExists( "Application {} exists".format(application_name) ) + except juju.errors.JujuError as e: + if "already exists" in e.message: + raise JujuApplicationExists( + "Application {} exists".format(application_name) + ) + else: + raise e finally: await self.disconnect_model(model) await self.disconnect_controller(controller)