commit: 23adf50912a502873b4799ce74c2ef5e5814f508
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Mar 31 15:39:56 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> 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 (