From 706715bc7d244eaced7364ceb09103643ccaa40c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 23 Feb 2018 17:02:11 -0500 Subject: [PATCH] Better error message on unsupported media The URI scheme is given a more appropriate and specific error. Change-Id: Ifc9690ba24e3ddfda1799eb2da68f1f76a1b8e92 --- pyghmi/ipmi/oem/lenovo/imm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index dacea248..bb0afea3 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -867,7 +867,9 @@ class XCCClient(IMMClient): rq['Protocol'] = 7 rq['Url'] = url else: - raise Exception('TODO') + raise pygexc.UnsupportedFunctionality( + '{0} scheme is not supported on this system or ' + 'invalid url format') rt = self.wc.grab_json_response('/api/providers/rp_vm_remote_connect', json.dumps(rq)) if 'return' not in rt or rt['return'] != 0: