From: David Garcia Date: Tue, 3 May 2022 10:23:59 +0000 (+0200) Subject: Skip exception if model doesn't exist after delete failure X-Git-Tag: v11.0.3~9 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=67912c1846a3e588c005e8ff2fddd016afee2aa1;p=osm%2FN2VC.git Skip exception if model doesn't exist after delete failure - bug: 2017 Change-Id: I9d118602c747840a4a32fd670c8724c82c1ee094 Signed-off-by: David Garcia (cherry picked from commit 5c96662b238a20ecc7c516269a0b051e3b0333eb) --- diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index 028cea8..f32ea09 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -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)