projects
/
matthijs
/
projects
/
backupninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
96f5b95
)
actions: Handle exceptions thrown by create_handler.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 10 Jun 2010 06:28:38 +0000
(08:28 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 10 Jun 2010 06:28:38 +0000
(08:28 +0200)
src/lib/backupninja/action.py
patch
|
blob
|
history
diff --git
a/src/lib/backupninja/action.py
b/src/lib/backupninja/action.py
index bb54d0a168f8b6985505ca658903b0c705a60baa..1ebc737cfdd76c7b0c176f175659128fd87e7a32 100644
(file)
--- 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)
# 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)