2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-27 17:16:42 +00:00

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.
This commit is contained in:
Markus Hilger
2026-08-10 23:50:39 +02:00
parent a325f65076
commit 016e08fa63
@@ -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