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:
parent
9d283e5c36
commit
41c4183045
@ -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)):
|
||||
|
Loading…
Reference in New Issue
Block a user