west: _bootstrap: clean up bootstrapping exceptions

Calling bootstrap() from the WestNotFound exception handler in init()
is making the WestNotFound show up in stack traces for errors in
bootstrap(), which makes for confusing output. Fix that by moving the
call to bootstrap() out.

Signed-off-by: Marti Bolivar <marti@foundries.io>
This commit is contained in:
Marti Bolivar 2019-01-16 01:01:17 -07:00 committed by Carles Cufí
parent c074732c42
commit af35c6a638
1 changed files with 4 additions and 0 deletions

View File

@ -171,7 +171,11 @@ to handle any resetting yourself.
try:
reinit(os.path.join(west_dir(args.directory), 'config'), args)
bootstrapping = False
except WestNotFound:
bootstrapping = True
if bootstrapping:
bootstrap(args)