mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-16 04:39:16 +00:00
Provide more reasonable error message to user
If a protocol is unsupported, propogate error message usefully.
This commit is contained in:
parent
7736056bf2
commit
9269c9feff
@ -495,7 +495,10 @@ class IpmiHandler(object):
|
||||
'nodes/{0}/media/uploads/{1}'.format(self.node, u.name)))
|
||||
|
||||
def handle_attach_media(self):
|
||||
self.ipmicmd.attach_remote_media(self.inputdata.filename)
|
||||
try:
|
||||
self.ipmicmd.attach_remote_media(self.inputdata.filename)
|
||||
except pygexc.UnsupportedFunctionality as uf:
|
||||
self.output.put(msg.ConfluentNodeError(self.node, str(uf)))
|
||||
|
||||
def handle_detach_media(self):
|
||||
self.ipmicmd.detach_remote_media()
|
||||
|
Loading…
x
Reference in New Issue
Block a user