mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-09 04:56:12 +00:00
Correct fixup for untyped data
This commit is contained in:
parent
5cd461c6ad
commit
69cbeecf1b
@ -233,7 +233,7 @@ def fixup_attribute(attrname, attrval):
|
||||
# right now it's just net. attributes
|
||||
netattrparts = attrname.split('.')
|
||||
attrname = netattrparts[0] + '.' + netattrparts[-1]
|
||||
if not isinstance(attrval, allattributes.node[attrname]['type']):
|
||||
if 'type' in allattributes.node[attrname] and not isinstance(attrval, allattributes.node[attrname]['type']):
|
||||
if (allattributes.node[attrname]['type'] == bool and
|
||||
(isinstance(attrval, str) or isinstance(attrval, unicode))):
|
||||
return attrval.lower() in ('true', '1', 'y', 'yes', 'enable', 'enabled')
|
||||
|
Loading…
Reference in New Issue
Block a user