Fail the job if gadget install fails

This commit is contained in:
Ben Jackson 2019-02-17 22:35:30 +00:00
commit 3ea8a12986

View file

@ -220,6 +220,7 @@ else:
gadget_dir = os.path.join( os.path.dirname( __file__ ), 'gadgets', OS )
failed = []
for name, gadget in GADGETS.items():
try:
v = {}
@ -260,4 +261,10 @@ for name, gadget in GADGETS.items():
print( "Done installing {}".format( name ) )
except Exception as e:
traceback.print_exc()
failed.append( name )
print( "FAILED installing {}: {}".format( name, e ) )
if failed:
raise RuntimeError( 'Failed to install gadgets: {}'.format(
','.join( failed ) ) )