diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-12-22 17:02:56 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-22 16:44:02 +0000 |
commit | c2cc5abe34169eae92067d97ce1e747e7c1413f5 (patch) | |
tree | 797ccfd27bcd5fea314f92f79819e710b1f5e583 | |
parent | bdbc4cf41d30eddb8a9ed882dedcc1670ce8fdd6 (diff) | |
download | openembedded-core-c2cc5abe34169eae92067d97ce1e747e7c1413f5.tar.gz openembedded-core-c2cc5abe34169eae92067d97ce1e747e7c1413f5.tar.bz2 openembedded-core-c2cc5abe34169eae92067d97ce1e747e7c1413f5.zip |
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.
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.py | 6 |
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): 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') |