From patchwork Wed Aug 20 11:47:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 381619 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 793DD14013B for ; Wed, 20 Aug 2014 21:48:28 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 864B8A740E; Wed, 20 Aug 2014 13:48:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TrUjR-+lr6zF; Wed, 20 Aug 2014 13:48:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6DD70A7400; Wed, 20 Aug 2014 13:48:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 88503A73FC for ; Wed, 20 Aug 2014 13:48:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id emLX4KIv70as for ; Wed, 20 Aug 2014 13:48:08 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id A985C4B630 for ; Wed, 20 Aug 2014 13:48:05 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id s7KBlqOU022155; Wed, 20 Aug 2014 20:47:52 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili16) with ESMTP id s7KBlrM17401; Wed, 20 Aug 2014 20:47:53 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi11) id s7KBlrSK022221; Wed, 20 Aug 2014 20:47:53 +0900 Received: from poodle by lomi11.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s7KBlrIS022166; Wed, 20 Aug 2014 20:47:53 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 0ADCF2743A5C; Wed, 20 Aug 2014 20:47:53 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 20 Aug 2014 20:47:44 +0900 Message-Id: <1408535269-24066-3-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408535269-24066-1-git-send-email-yamada.m@jp.panasonic.com> References: <1408535269-24066-1-git-send-email-yamada.m@jp.panasonic.com> Cc: Tom Rini Subject: [U-Boot] [PATCH 2/7] tools/genboardscfg.py: be tolerant of missing MAINTAINERS X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Acked-by: Simon Glass --- tools/genboardscfg.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py index eb957ba..03bd5b3 100755 --- a/tools/genboardscfg.py +++ b/tools/genboardscfg.py @@ -102,13 +102,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. @@ -116,6 +122,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):