From de88c0574ee3a05d9fab1ee99803d098b459dc87 Mon Sep 17 00:00:00 2001 From: "Taihsiang Ho (tai271828)" Date: Fri, 17 Apr 2020 18:36:26 +0200 Subject: [PATCH] docs: correct model destroying idiom model.info is None after disconnecting to the model so the original idiom will not work. --- docs/narrative/model.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/narrative/model.rst b/docs/narrative/model.rst index 42633a1cb..82c41405b 100644 --- a/docs/narrative/model.rst +++ b/docs/narrative/model.rst @@ -110,8 +110,9 @@ py:method:`juju.controller.Controller.destroy_model` for more info. # Do stuff with our model... # Destroy the model + model_uuid = model.info.uuid await model.disconnect() - await controller.destroy_model(model.info.uuid) + await controller.destroy_model(model_uuid) model = None