From: David Garcia Date: Thu, 28 Apr 2022 11:43:36 +0000 (+0200) Subject: Fix bug 2016: Skip exception if model has been removed X-Git-Tag: v12.0.0rc1~24 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=commitdiff_plain;h=7e887b22fdc176021b215c3b83a052276fdbeefc Fix bug 2016: Skip exception if model has been removed Change-Id: I1d1d6e0c18c7e6a8c42c03a1e39e4673caa0b637 Signed-off-by: David Garcia --- diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index 0c0180f..028cea8 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -1254,6 +1254,10 @@ class Libjuju: raise Exception( "Timeout waiting for model {} to be destroyed".format(model_name) ) + except juju.errors.JujuError as e: + if any("has been removed" in error for error in e.errors): + return + raise e async def destroy_application( self, model_name: str, application_name: str, total_timeout: float