mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-05 20:47:57 +00:00
Say when a platform cannot report its ntp state
get_ntp_enabled returns None to mean the platform cannot tell us, and that went to the caller as the literal text "None", which says nothing at all. Report it as unsupported instead, which the tooling already renders plainly.
This commit is contained in:
@@ -1559,6 +1559,11 @@ class IpmiHandler:
|
||||
if self.element[3] == 'enabled':
|
||||
if 'read' == self.op:
|
||||
enabled = await self.ipmicmd.get_ntp_enabled()
|
||||
if enabled is None:
|
||||
# None is how the platform says it cannot tell us, and
|
||||
# reporting that as the text "None" tells the caller nothing
|
||||
raise pygexc.UnsupportedFunctionality(
|
||||
'NTP state is not reported by this platform')
|
||||
await self.output.put(msg.NTPEnabled(self.node, enabled))
|
||||
return
|
||||
elif 'update' == self.op:
|
||||
|
||||
Reference in New Issue
Block a user