From 41c41830452c022e7ffe0c7dca1e0f130449cbb8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 13 Feb 2014 15:16:21 -0500 Subject: [PATCH] Correct type protection code For an attribute with restricted types, correctly check the type of inbound data. --- confluent/config/configmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent/config/configmanager.py b/confluent/config/configmanager.py index f7fe8756..dc6750e0 100644 --- a/confluent/config/configmanager.py +++ b/confluent/config/configmanager.py @@ -575,7 +575,7 @@ class ConfigManager(object): for attrname in attribmap[node].iterkeys(): if (attrname not in attributes.node or ('type' in attributes.node[attrname] and - type(attribmap[node][attrname]) not in attributes.node[attrname])): + type(attribmap[node][attrname]) not in attributes.node[attrname]['type'])): raise ValueError newdict = {} if (isinstance(attribmap[node][attrname], str)):