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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user