Skip to content
Snippets Groups Projects
Commit b8828e8f authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

tools/genboardscfg.py: be tolerant of missing MAINTAINERS


tools/genboardscfg.py expects all the boards have MAINTAINERS.
If someone adds a new board but misses to add its MAINTAINERS file,
tools/genboardscfg.py fails to generate the boards.cfg file.
It is annoying for the other developers.

This commit allows tools/genboardscfg.py to display warning messages
and continue processing even if some MAINTAINERS files are missing
or have broken formats.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 04b43f32
No related merge requests found
...@@ -100,13 +100,19 @@ class MaintainersDatabase: ...@@ -100,13 +100,19 @@ class MaintainersDatabase:
Returns: Returns:
Either 'Active' or 'Orphan' Either 'Active' or 'Orphan'
""" """
if not target in self.database:
print >> sys.stderr, "WARNING: no status info for '%s'" % target
return '-'
tmp = self.database[target][0] tmp = self.database[target][0]
if tmp.startswith('Maintained'): if tmp.startswith('Maintained'):
return 'Active' return 'Active'
elif tmp.startswith('Orphan'): elif tmp.startswith('Orphan'):
return 'Orphan' return 'Orphan'
else: else:
print >> sys.stderr, 'Error: %s: unknown status' % tmp print >> sys.stderr, ("WARNING: %s: unknown status for '%s'" %
(tmp, target))
return '-'
def get_maintainers(self, target): def get_maintainers(self, target):
"""Return the maintainers of the given board. """Return the maintainers of the given board.
...@@ -114,6 +120,10 @@ class MaintainersDatabase: ...@@ -114,6 +120,10 @@ class MaintainersDatabase:
If the board has two or more maintainers, they are separated If the board has two or more maintainers, they are separated
with colons. with colons.
""" """
if not target in self.database:
print >> sys.stderr, "WARNING: no maintainers for '%s'" % target
return ''
return ':'.join(self.database[target][1]) return ':'.join(self.database[target][1])
def parse_file(self, file): def parse_file(self, file):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment