From afd1e0da9f95e80d2be527bf5fd9f6458131133c Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas.kluyver@xfel.eu>
Date: Wed, 6 Mar 2024 15:55:12 +0100
Subject: [PATCH] Fix getting hostname for error messages about device servers
 config

---
 src/calng/CalibrationManager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/calng/CalibrationManager.py b/src/calng/CalibrationManager.py
index ab4eb34d..6a1aaabc 100644
--- a/src/calng/CalibrationManager.py
+++ b/src/calng/CalibrationManager.py
@@ -1073,7 +1073,7 @@ class CalibrationManager(DeviceClientBase, Device):
         # need are in there, and obtain their API names.
         for host, req_names in hosts.items():
             # Retrieve hostname for nice error messages.
-            hostname = urlparse(self._server_hosts[name]).hostname
+            hostname = urlparse(host).hostname
 
             try:
                 reply = await to_asyncio_future(self._http_client.fetch(
-- 
GitLab