From 2ba5119f44ce024e014f8bc41abebad01faf6dbd Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 14 Aug 2026 17:43:20 +0200 Subject: [PATCH] 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. --- confluent_server/aiohmi/redfish/command.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/confluent_server/aiohmi/redfish/command.py b/confluent_server/aiohmi/redfish/command.py index d6bdc76f..73ee3281 100644 --- a/confluent_server/aiohmi/redfish/command.py +++ b/confluent_server/aiohmi/redfish/command.py @@ -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'