2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Merge pull request #67 from alin37/master

Fix nodelist and nodeattrib to read attributes in groups
This commit is contained in:
Jarrod Johnson 2017-03-03 13:22:14 -05:00 committed by GitHub
commit eb18796d94
2 changed files with 20 additions and 0 deletions

View File

@ -125,6 +125,16 @@ if len(args) > 0:
attrout = '{0}: {1}: *ERROR* BROKEN EXPRESSION: ' \
'{2}'.format(node, attr,
currattr['broken'])
elif isinstance(currattr, list) or isinstance(currattr, tuple):
attrout = '{0}: {1}: {2}'.format(node, attr, ', '.join(map(str, currattr)))
elif isinstance(currattr, dict):
dictout = []
for k,v in currattr.items:
dictout.append("{0}={1}".format(k,v))
attrout = '{0}: {1}: {2}'.format(node, attr, ', '.join(map(str, dictout)))
else:
print ("CODE ERROR" + repr(attr))
if options.blame or 'broken' in currattr:
blamedata = []
if 'inheritedfrom' in currattr:

View File

@ -80,6 +80,16 @@ if len(args) > 1:
attrout = '{0}: {1}: *ERROR* BROKEN EXPRESSION: ' \
'{2}'.format(node, attr,
currattr['broken'])
elif isinstance(currattr, list) or isinstance(currattr, tuple):
attrout = '{0}: {1}: {2}'.format(node, attr, ', '.join(map(str, currattr)))
elif isinstance(currattr, dict):
dictout = []
for k, v in currattr.items:
dictout.append("{0}={1}".format(k, v))
attrout = '{0}: {1}: {2}'.format(node, attr, ', '.join(map(str, dictout)))
else:
print ("CODE ERROR" + repr(attr))
if options.blame or 'broken' in currattr:
blamedata = []
if 'inheritedfrom' in currattr: