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

Judge a bios link by the status it answered

A link that is not served need not answer with a redfish error, so the
message id could not decide.
This commit is contained in:
Markus Hilger
2026-08-14 17:43:20 +02:00
parent eb742c5701
commit 2ba5119f44
+7 -2
View File
@@ -697,8 +697,13 @@ class Command(object):
# than passing the bmc's complaint on as an unexpected error.
try:
await self._do_web_request(biosurl)
except exc.RedfishError as re:
if 'ResourceNotFound' not in str(re.msgid):
except exc.PyghmiException:
# A link that is not served need not answer with a redfish
# error, and the exception cannot say what the status was,
# so ask. Anything else is a fault, not an answer.
_, status = await self.wc.grab_json_response_with_status(
biosurl)
if status not in (404, 405, 501):
raise
biosurl = ''
# '' is remembered as 'asked, and there is none'