Skip exception if model doesn't exist after delete failure
[osm/N2VC.git] / n2vc / libjuju.py
index 028cea8..f32ea09 100644 (file)
@@ -1223,6 +1223,10 @@ class Libjuju:
                 controller,
                 timeout=total_timeout,
             )
+        except Exception as e:
+            if not await self.model_exists(model_name, controller=controller):
+                return
+            raise e
         finally:
             if model:
                 await self.disconnect_model(model)