From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CA6DF138200 for ; Tue, 23 Jul 2013 18:34:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 502BCE09FB; Tue, 23 Jul 2013 18:34:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C760DE09FB for ; Tue, 23 Jul 2013 18:34:37 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D30EA33E983 for ; Tue, 23 Jul 2013 18:34:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 57079E5466 for ; Tue, 23 Jul 2013 18:34:34 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1374604328.7481d8294f8ba8e6045ae84ba524b80997b72f60.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/rpackage/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/rpackage/licensemap.py X-VCS-Directories: roverlay/rpackage/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 7481d8294f8ba8e6045ae84ba524b80997b72f60 X-VCS-Branch: master Date: Tue, 23 Jul 2013 18:34:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dc20b962-91a9-4fe7-8db1-d42cba679360 X-Archives-Hash: cdcdfb1ae9e34df12375e705f46c2391 Message-ID: <20130723183434.uA9ui3tA_4VNSPTVPYlFVecd5YjS0fCtvlnv6j3SM8I@z> commit: 7481d8294f8ba8e6045ae84ba524b80997b72f60 Author: André Erdmann mailerd de> AuthorDate: Tue Jul 23 18:32:08 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Jul 23 18:32:08 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=7481d829 do not fail if license map file is missing --- roverlay/rpackage/licensemap.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/roverlay/rpackage/licensemap.py b/roverlay/rpackage/licensemap.py index 2332ee6..f64664d 100644 --- a/roverlay/rpackage/licensemap.py +++ b/roverlay/rpackage/licensemap.py @@ -67,13 +67,12 @@ class LicenseMap ( object ): except KeyError: pass - try: - return self.license_map_file [k] - except KeyError: - pass - except AttributeError: - # no license_map_file - pass + if self.license_map_file: + # else no license_map_file + try: + return self.license_map_file [k] + except KeyError: + pass self.logger.warning ( "Missing license map entry for {!r} ({!r})".format ( k, key )