X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fbackupninja.git;a=blobdiff_plain;f=src%2Flib%2Fbackupninja%2Faction.py;h=1ebc737cfdd76c7b0c176f175659128fd87e7a32;hp=bb54d0a168f8b6985505ca658903b0c705a60baa;hb=5687af1dbbe8647ac6f333e0480d44e31d1fa6f3;hpb=409a50cb7b0b6ebbf02405e3055e6e5a1865d416;ds=sidebyside diff --git a/src/lib/backupninja/action.py b/src/lib/backupninja/action.py index bb54d0a..1ebc737 100644 --- a/src/lib/backupninja/action.py +++ b/src/lib/backupninja/action.py @@ -53,15 +53,12 @@ def run_action(action, opts, global_config): # 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 + handler = handlers.create_handler(action_ty, action_config) + # Run it + handler.run() + handler.finish() + except Exception, e: + log.error('Running action "%s" failed: %s', action, e)