| commit | bcd65c7ff17d30c3370bed9b5f28e40dd38b26f8 | [log] [tgz] |
|---|---|---|
| author | aktas <emin.aktas@ulakhaberlesme.com.tr> | Tue Oct 19 20:03:23 2021 +0300 |
| committer | aktas <emin.aktas@ulakhaberlesme.com.tr> | Thu Oct 21 17:21:16 2021 +0200 |
| tree | 4ea1a698a3711dafc3471b4dc6f212b9d87227da | |
| parent | df4d92f6c7b54c1721ccb8aa432c7612dadd5479 [diff] |
Fix bug 1718 In sometimes, it cannot catch that if the application is in the model. Jenkinks report: https://osm.etsi.org/jenkins/view/Robot%20tests/job/osm-stage_3-merge/job/v10.0/169/robot/report/report.html#tags?basic_20 Change-Id: I8121d57923d93b7af9ad60e07b87b4616060a916 Signed-off-by: aktas <emin.aktas@ulakhaberlesme.com.tr> (cherry picked from commit 42e51cfd7f807a2281ea3285d752b7142175da78)
diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index 6ece5d0..6aa31cc 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py
@@ -791,6 +791,13 @@ 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)