2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-28 16:20:54 +00:00

Replace generic unsupported error with more specific

The generic error was unclear for a fairly common attempt to check power state.
This commit is contained in:
Jarrod Johnson
2026-09-25 16:50:49 -04:00
parent 03a3786f93
commit ae1afcabf8
+4 -1
View File
@@ -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):