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 58AE81387FD for ; Tue, 1 Apr 2014 16:38:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 77F3AE0AAF; Tue, 1 Apr 2014 16:38:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0C3B3E0AAE for ; Tue, 1 Apr 2014 16:38:52 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3435333FCCC for ; Tue, 1 Apr 2014 16:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id C2B99188FC for ; Tue, 1 Apr 2014 16:38:48 +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: <1396280396.23adf50912a502873b4799ce74c2ef5e5814f508.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/config/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/config/fielddef.py X-VCS-Directories: roverlay/config/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 23adf50912a502873b4799ce74c2ef5e5814f508 X-VCS-Branch: master Date: Tue, 1 Apr 2014 16:38:48 +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: 38f14b62-d413-4f95-9aac-3cd824a4e320 X-Archives-Hash: c5fd5d43dd64b4c1bfa39783ec62f0ac commit: 23adf50912a502873b4799ce74c2ef5e5814f508 Author: André Erdmann mailerd de> AuthorDate: Mon Mar 31 15:39:56 2014 +0000 Commit: André Erdmann mailerd de> CommitDate: Mon Mar 31 15:39:56 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=23adf509 config/fielddef: log path of the missing licenses file --- roverlay/config/fielddef.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/roverlay/config/fielddef.py b/roverlay/config/fielddef.py index d5ff53d..ee4e943 100644 --- a/roverlay/config/fielddef.py +++ b/roverlay/config/fielddef.py @@ -140,12 +140,20 @@ class DescriptionFieldDefinition ( object ): "config: LICENSEMAP.licenses_file is not set." ) - licenses_list = list ( - itertools.chain.from_iterable ( - line.strip().split ( None ) for line in - roverlay.util.fileio.read_text_file ( LICENSE_FILE ) + try: + licenses_list = list ( + itertools.chain.from_iterable ( + line.strip().split ( None ) for line in + roverlay.util.fileio.read_text_file ( LICENSE_FILE ) + ) ) - ) + except IOError as err: + if err.errno == errno.ENOENT: + self.logger.critical ( + "licenses file {!r} does not exist.".format ( LICENSE_FILE ) + ) + # -- end if + raise self.logger.debug ( "Using {n:d} licenses from file: {!r}".format (