summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-23 01:00:01 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:33 +0000
commitc1f4e929c943fdbdb468a517db98d5b3653663d3 (patch)
tree98c21c619a95073651bbc0b0c5dd2c5053d5524d /scripts/lib/recipetool
parent10c8d14d1ae1ae57367e993576c82a0b4cd4938e (diff)
downloadpoky-c1f4e929c943fdbdb468a517db98d5b3653663d3.tar.gz
recipetool: create: better fix for fetch error handling
I was a little bit hasty in OE-Core revision c2cc5abe34169eae92067d97ce1e747e7c1413f5 - it turns out BitBake's fetcher code is not consistent in whether it logs something useful or not; when fetching from an http URL it does but with a git repository it doesn't. In advance of any major reworking of fetch error handling in BitBake, let's just print the text of the exception and then we know we have shown something to the user. Additionally, we were only catching FetchException here but there are several other classes of exception that the fetcher can raise (e.g. MalformedUrl); catch the parent BBFetchException class instead so we avoid tracebacks for those other classes as well. (From OE-Core rev: 578d3873a6415c9203c185c21cff472f7d2dab02) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool')
-rw-r--r--scripts/lib/recipetool/create.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index f0bb58e4bd..5f90b10353 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -299,8 +299,8 @@ def create_recipe(args):
299 logger.info('Fetching %s...' % srcuri) 299 logger.info('Fetching %s...' % srcuri)
300 try: 300 try:
301 checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev) 301 checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev)
302 except bb.fetch2.FetchError: 302 except bb.fetch2.BBFetchException as e:
303 # Error already printed 303 logger.error(str(e).rstrip())
304 sys.exit(1) 304 sys.exit(1)
305 dirlist = os.listdir(srctree) 305 dirlist = os.listdir(srctree)
306 if 'git.indirectionsymlink' in dirlist: 306 if 'git.indirectionsymlink' in dirlist: