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>
This commit is contained in:
parent
470f20bc02
commit
c2f17428b8
|
@ -122,7 +122,11 @@ def create_recipe(args):
|
||||||
tempsrc = tempfile.mkdtemp(prefix='recipetool-')
|
tempsrc = tempfile.mkdtemp(prefix='recipetool-')
|
||||||
srctree = tempsrc
|
srctree = tempsrc
|
||||||
logger.info('Fetching %s...' % srcuri)
|
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)
|
dirlist = os.listdir(srctree)
|
||||||
if 'git.indirectionsymlink' in dirlist:
|
if 'git.indirectionsymlink' in dirlist:
|
||||||
dirlist.remove('git.indirectionsymlink')
|
dirlist.remove('git.indirectionsymlink')
|
||||||
|
|
Loading…
Reference in New Issue