- # 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)
-
- # Silently skip invalid handlers, create_handler will have
- # logged an error
- if handler:
- try:
- # Run the handler
- handler.run()
- handler.finish()
- except Exception, e:
- log.error('Running action "%s" failed: %s', action, e)
+ 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)
+ except Exception, e:
+ log.error('Running action "%s.%s" failed: %s', action_name, action_ty, e)
+ import traceback
+ log.debug(traceback.format_exc())