summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-08-25 12:39:43 +0900
committerTom Rini <trini@ti.com>2014-08-28 17:18:48 -0400
commitb8828e8ff3c2b3e6e79490b286e78fb75ca7d82e (patch)
treed4a29873f907040535125ea186a0cdbacd0101dd /tools
parent04b43f32731c1171877541050bb3f2bfeb100e3d (diff)
downloadu-boot-imx-b8828e8ff3c2b3e6e79490b286e78fb75ca7d82e.zip
u-boot-imx-b8828e8ff3c2b3e6e79490b286e78fb75ca7d82e.tar.gz
u-boot-imx-b8828e8ff3c2b3e6e79490b286e78fb75ca7d82e.tar.bz2
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: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/genboardscfg.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
index 31ae844..18720a2 100755
--- a/tools/genboardscfg.py
+++ b/tools/genboardscfg.py
@@ -100,13 +100,19 @@ class MaintainersDatabase:
Returns:
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]
if tmp.startswith('Maintained'):
return 'Active'
elif tmp.startswith('Orphan'):
return 'Orphan'
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):
"""Return the maintainers of the given board.
@@ -114,6 +120,10 @@ class MaintainersDatabase:
If the board has two or more maintainers, they are separated
with colons.
"""
+ if not target in self.database:
+ print >> sys.stderr, "WARNING: no maintainers for '%s'" % target
+ return ''
+
return ':'.join(self.database[target][1])
def parse_file(self, file):