diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-12-22 17:02:56 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-15 15:41:31 +0000 |
commit | b2706b5b311d456e7da5acf02e25f3f8650c50e5 (patch) | |
tree | 59c918c4dfc8e07309a4a1069fa03db98e873b5e /scripts | |
parent | 9d41e993a95a7b60f1ed5f8e9ca887fdf393233c (diff) | |
download | openembedded-core-contrib-b2706b5b311d456e7da5acf02e25f3f8650c50e5.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)
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.py | 6 |
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): tempsrc = tempfile.mkdtemp(prefix='recipetool-') srctree = tempsrc logger.info('Fetching %s...' % srcuri) - checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev) + try: + checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev) + except bb.fetch2.FetchError: + # Error already printed + sys.exit(1) dirlist = os.listdir(srctree) if 'git.indirectionsymlink' in dirlist: dirlist.remove('git.indirectionsymlink') |