From 8eef064b9fb82379a04e2d090b936466d561b91f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 2 Dec 2016 10:35:24 -0500 Subject: [PATCH] Provide more useful error on socket error If a socket error occurred that wasn't -2, the client would get an error about KeyError, which wouldn't be helpful. raise the unhandled exception to provide more informative data in case of an issue. --- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 64fbe900..0f7106de 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -344,6 +344,7 @@ class IpmiHandler(object): except socket.gaierror as ge: if ge[0] == -2: raise exc.TargetEndpointUnreachable(ge[1]) + raise self.ipmicmd = persistent_ipmicmds[(node, tenant)] self.ipmicmd.setup_confluent_keyhandler()