summaryrefslogtreecommitdiffstats
path: root/scripts
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>2016-01-15 15:51:40 +0000
commit383159ef649810d48f5fb78f4e32fef43d9bd6ea (patch)
tree68b954f94c4855359bd7a7e03eea6d85e13c4a57 /scripts
parentbe40baa5a0bffd6e8512a830f43ce9ce20d0ff36 (diff)
downloadpoky-383159ef649810d48f5fb78f4e32fef43d9bd6ea.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 master rev: c2cc5abe34169eae92067d97ce1e747e7c1413f5) (From OE-Core rev: b2706b5b311d456e7da5acf02e25f3f8650c50e5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 e2941d7753..13aaf148e6 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')