From fb10221e1bc51ffad695598b28bf558145d0c199 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 16 Aug 2024 11:26:52 -0400 Subject: [PATCH] Amend affluent error handling Be more consistent and informative --- .../confluent/plugins/hardwaremanagement/affluent.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/affluent.py b/confluent_server/confluent/plugins/hardwaremanagement/affluent.py index 8946ae0e..ee10bd7d 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/affluent.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/affluent.py @@ -46,7 +46,13 @@ class WebClient(object): 'pubkeys.tls_hardwaremanager attribute')) return {} except (socket.gaierror, socket.herror, TimeoutError) as e: - results.put(msg.ConfluentTargetTimeout(e.strerror)) + results.put(msg.ConfluentTargetTimeout(self.node, str(e))) + return {} + except OSError as e: + if e.errno == 113: + results.put(msg.ConfluentTargetTimeout(self.node)) + else: + results.put(msg.ConfluentTargetTimeout(self.node), str(e)) return {} except Exception as e: results.put(msg.ConfluentNodeError(self.node,