now supports maintainers and author field for display as MAINTAINERS

This commit is contained in:
Brian Coca 2015-07-16 15:18:33 -04:00
parent c603caca27
commit 5ba9fe4748

View file

@ -285,10 +285,18 @@ class DocCLI(CLI):
text.append(doc['returndocs'])
text.append('')
if isinstance(doc['author'], basestring):
maintainers = [doc['author']]
else:
maintainers = doc['author']
maintainers = set()
if 'author' in doc:
if isinstance(doc['author'], basestring):
maintainers.add(doc['author'])
else:
maintainers.update(doc['author'])
if 'maintainers' in doc:
if isinstance(doc['maintainers'], basestring):
maintainers.add(doc['author'])
else:
maintainers.update(doc['author'])
text.append('MAINTAINERS: ' + ', '.join(maintainers))
text.append('')