Fix bug 1718
[osm/N2VC.git] / n2vc / libjuju.py
index 6ece5d0..6aa31cc 100644 (file)
@@ -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)