X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=n2vc%2Flibjuju.py;h=6aa31cc9f0d96fde376a458dd2746930592b94a7;hb=refs%2Fchanges%2F80%2F11280%2F2;hp=9961e1935ebad1e23122f3cae193443240d0a0da;hpb=3061bef8813d539f903d00bdccc023c6683222b4;p=osm%2FN2VC.git diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index 9961e19..6aa31cc 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -642,7 +642,6 @@ class Libjuju: :param: application_name: Application name :param: model_name: Model name :param: machine_id Machine id - :param: db_dict: Dictionary with data of the DB to write the updates :param: total_timeout: Timeout for the entity to be active :return: None @@ -792,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)