From 7465e2ccb2686cbdbc4c6f7dd8dfcecf10697a37 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 3 May 2021 11:18:09 +1200 Subject: [PATCH] fix logging unconfigured models debugging Launchpad bug 1926616 would have been much easier if this was working! --- subiquity/models/subiquity.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/subiquity/models/subiquity.py b/subiquity/models/subiquity.py index 6c83916e..d45ed447 100644 --- a/subiquity/models/subiquity.py +++ b/subiquity/models/subiquity.py @@ -138,16 +138,20 @@ class SubiquityModel: return self._events[model_name].set() if model_name in INSTALL_MODEL_NAMES: + stage = 'install' unconfigured = { mn for mn in INSTALL_MODEL_NAMES - if not self._events[model_name].is_set() + if not self._events[mn].is_set() } elif model_name in POSTINSTALL_MODEL_NAMES: + stage = 'postinstall' unconfigured = { mn for mn in POSTINSTALL_MODEL_NAMES - if not self._events[model_name].is_set() + if not self._events[mn].is_set() } - log.debug("model %s is configured, to go %s", model_name, unconfigured) + log.debug( + "model %s for %s is configured, to go %s", + model_name, stage, unconfigured) def needs_configuration(self, model_name): if model_name is None: