From 8e7bc7fd70b2ce8a43d135b4ecadf3344619d94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20BERSAC?= Date: Fri, 28 Jun 2024 18:23:15 +0200 Subject: [PATCH] fixup! Create temboardui.prometheus module --- ui/temboardui/prometheus.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/temboardui/prometheus.py b/ui/temboardui/prometheus.py index 37f954e7f..ac9399a2e 100644 --- a/ui/temboardui/prometheus.py +++ b/ui/temboardui/prometheus.py @@ -118,7 +118,10 @@ def _setup_instances(self): provisionner.inspect() session = Session() - for (instance,) in session.execute(orm.Instances.all()): + for instance in session.execute(orm.Instances.all()): + if len(instance) == 1: # SQAlchemy 1.4+ returns a tuple + (instance,) = instance + if not instance.discover: logger.debug("Skipping unreached instance %s.", instance) continue