From 1e0eb2ef31e602cb06b9deac63c21021763c2a02 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Mon, 5 Feb 2024 16:32:40 +0100 Subject: [PATCH] better naming --- slic/core/acquisition/broker_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slic/core/acquisition/broker_tools.py b/slic/core/acquisition/broker_tools.py index a021f333..7759c3a5 100644 --- a/slic/core/acquisition/broker_tools.py +++ b/slic/core/acquisition/broker_tools.py @@ -18,7 +18,7 @@ ENDSTATION_TO_PULSEID_PVS = { "furka": "SATES30-CVME-EVR0:RX-PULSEID" } -IP_TO_ENDSTATION = { +SUBNET_TO_ENDSTATION = { "129.129.242": "alvra", "129.129.243": "bernina", "129.129.244": "cristallina", @@ -66,7 +66,7 @@ def get_endstation(): ip = socket.gethostbyname(name) key = cut_after_nth(ip, ".", 3) try: - return IP_TO_ENDSTATION[key] + return SUBNET_TO_ENDSTATION[key] except KeyError as e: raise RuntimeError(f"cannot assign endstation to IP {ip} ({name})") from e