From ae1afcabf8ef35c5517c8f45f3c7da73c04505d5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 25 Sep 2026 16:50:49 -0400 Subject: [PATCH] Replace generic unsupported error with more specific The generic error was unclear for a fairly common attempt to check power state. --- confluent_server/aiohmi/redfish/command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/aiohmi/redfish/command.py b/confluent_server/aiohmi/redfish/command.py index eace4d92..3decf05e 100644 --- a/confluent_server/aiohmi/redfish/command.py +++ b/confluent_server/aiohmi/redfish/command.py @@ -488,7 +488,10 @@ class Command(object): return await self._do_web_request(bmcurl) async def get_power(self): - currinfo = await self._do_web_request(self._system_url(), cache=False) + try: + currinfo = await self._do_web_request(self._system_url(), cache=False) + except exc.UnsupportedFunctionality: + raise exc.UnsupportedFunctionality('Power status and control not supported') return {'powerstate': str(currinfo['PowerState'].lower())} async def reseat_bay(self, bay):