From 016e08fa63a30f2bf53fcb938ccda23add8dec87 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 10 Aug 2026 23:50:39 +0200 Subject: [PATCH] Catch socket errors, not the socket class, while firmware applies The retry around the firmware progress poll named socket.socket, which is not an exception class, so the moment the request it guards actually failed Python raised "catching classes that do not inherit from BaseException is not allowed" in place of the error. socket.error is OSError, which is what a failed poll raises and what the retry below was written for. --- confluent_server/aiohmi/redfish/oem/lenovo/xcc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py b/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py index 33eeaab3..166aad02 100644 --- a/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py +++ b/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py @@ -1371,7 +1371,7 @@ class OEMHandler(generic.OEMHandler): while not complete and retry > 0: try: pgress = await self._do_web_request(monitorurl, cache=False) - except socket.socket: + except socket.error: pgress = None if not pgress: retry -= 1