small fix. Weigth wurde nicht als float an networx Modul übergeben. Dadurch wurde durch eine Exception das Program nicht beendet
This commit is contained in:
+1
-1
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user