From 9269c9feffa30bf811541201f7afc9136b9b055f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Feb 2018 14:51:00 -0500 Subject: [PATCH] Provide more reasonable error message to user If a protocol is unsupported, propogate error message usefully. --- .../confluent/plugins/hardwaremanagement/ipmi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 0750694a..eff94678 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -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()