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)
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