summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 17:02:56 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-28 09:25:12 +0000
commitc2f17428b8991efe3ccec9ef0ab4badfdf718dd8 (patch)
tree22da00421c11cfc1989a4371c3a29229332698d5
parent470f20bc0261617d8f2cfdaf32d79d42432e6575 (diff)
downloadpoky-c2f17428b8991efe3ccec9ef0ab4badfdf718dd8.tar.gz
recipetool: create: avoid traceback on fetch error
If a fetch error occurs, the fetcher already prints a reasonable error - we don't need the traceback as well, so catch that and exit if it occurs. (From OE-Core rev: c2cc5abe34169eae92067d97ce1e747e7c1413f5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/recipetool/create.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 7987fbb0c4..f98f5257f4 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -122,7 +122,11 @@ def create_recipe(args):
122 tempsrc = tempfile.mkdtemp(prefix='recipetool-') 122 tempsrc = tempfile.mkdtemp(prefix='recipetool-')
123 srctree = tempsrc 123 srctree = tempsrc
124 logger.info('Fetching %s...' % srcuri) 124 logger.info('Fetching %s...' % srcuri)
125 checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev) 125 try:
126 checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev)
127 except bb.fetch2.FetchError:
128 # Error already printed
129 sys.exit(1)
126 dirlist = os.listdir(srctree) 130 dirlist = os.listdir(srctree)
127 if 'git.indirectionsymlink' in dirlist: 131 if 'git.indirectionsymlink' in dirlist:
128 dirlist.remove('git.indirectionsymlink') 132 dirlist.remove('git.indirectionsymlink')