From 192c7361c19b1243216dab773b94c0c6fa4c17e2 Mon Sep 17 00:00:00 2001 From: mistangl Date: Tue, 27 May 2025 18:58:38 +0200 Subject: [PATCH] =?UTF-8?q?small=20fix.=20Weigth=20wurde=20nicht=20als=20f?= =?UTF-8?q?loat=20an=20networx=20Modul=20=C3=BCbergeben.=20Dadurch=20wurde?= =?UTF-8?q?=20durch=20eine=20Exception=20das=20Program=20nicht=20beendet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plant.py | 2 +- lib/routing.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/plant.py b/lib/plant.py index c1fabfd..2d50031 100644 --- a/lib/plant.py +++ b/lib/plant.py @@ -411,7 +411,7 @@ class Anlage(): def get_tunnel_length(self, tname: str): if tname in self._tunnels: - return self._tunnel_lengths[tname] + return float(self._tunnel_lengths[tname]) raise Exception("Tunnel not found") def add_tunnels(self, tunnels:dict): diff --git a/lib/routing.py b/lib/routing.py index 1a65880..231b930 100644 --- a/lib/routing.py +++ b/lib/routing.py @@ -178,6 +178,8 @@ if __name__ == "__main__": print(to_json(cable_paths['errors_sensors'])) print("failed dists:") print(to_json(cable_paths['errors_dists'])) + print("failed tunnels:") + print(to_json(cable_paths['errors_tunnels'])) # Ausgabe schreiben if args.write: