better naming

This commit is contained in:
2024-02-05 16:32:40 +01:00
parent 0fad46a388
commit 1e0eb2ef31
+2 -2
View File
@@ -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