2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 19:40:12 +00:00

Correct type protection code

For an attribute with restricted types, correctly check the type of
inbound data.
This commit is contained in:
Jarrod Johnson 2014-02-13 15:16:21 -05:00
parent 9d283e5c36
commit 41c4183045

View File

@ -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)):