- # Get the config for this action
- action_config = config.get_action_config(opts, action)
- # Create a handler for this action
- handler = handlers.create_handler(action_ty, action_config)
+ try:
+ # Create a handler for this action
+ action = handlers.create_action(action_ty)
+ # Let the handler load its configuration file
+ action.load_config(action_config)
+ # Run it
+ action.run(test=opts.test)
+ action.finish(test=opts.test)
+ # Ask the action if there where any failures
+ success = not action.failed
+ except Exception, e:
+ log.error('Unexpected exception: %s', e)
+ import traceback
+ log.debug(traceback.format_exc())
+ success = False