From 88275f511088cc25f2881f9910044b6047acfcda Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 14 Jan 2019 15:37:04 -0500 Subject: [PATCH] Fix xcc handler on incomplete data A datum may come in without an attribute member at all. Treat this as 'false', obviously. --- confluent_server/confluent/discovery/handlers/xcc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index 574c1b09..e093b9fb 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -27,7 +27,7 @@ class NodeHandler(immhandler.NodeHandler): def adequate(cls, info): # We can sometimes receive a partially initialized SLP packet # This is not adequate for being satisfied - return bool(info['attributes']) + return bool(info.get('attributes', {})) def preconfig(self): ff = self.info.get('attributes', {}).get('enclosure-form-factor', '')