From 5c96662b238a20ecc7c516269a0b051e3b0333eb Mon Sep 17 00:00:00 2001 From: David Garcia Date: Tue, 3 May 2022 12:23:59 +0200 Subject: [PATCH] Skip exception if model doesn't exist after delete failure - bug: 2016 Change-Id: I9d118602c747840a4a32fd670c8724c82c1ee094 Signed-off-by: David Garcia --- n2vc/libjuju.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index 1fade62..bca3665 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -1341,6 +1341,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) -- 2.17.1