mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-29 01:56:46 +00:00
564230cf7e
A console whose bmc had gone away reported "Unexpected error - None", and the api answered 504 with an error of None. The redfish plugin took the text for an unreachable target from the strerror of the socket error it caught, guarded by a hasattr that is always true: every OSError has a strerror attribute, and it is None on most of the ones a bmc going away produces, TimeoutError and gaierror among them. Ask for the text the same way as everywhere else instead, which also keeps the errno on the errors that do carry one. The same applies to an unreachable target raised with no message at all, so use the same helper there, on both transports. Underneath that, give the node error messages a default to fall back on rather than carrying whatever they were handed. Each subclass already had one, in an __init__ that an explicit None went straight past; making it a class attribute the base class applies means it holds however the message was built, and removes five copies of the same constructor. Also repair an affluent handler that put a closing parenthesis in the wrong place, passing its error text to Queue.put_nowait as a second argument. Any OSError there other than "no route to host" raised TypeError from inside the except clause instead of reporting anything.